var nb=Object.defineProperty;var $m=e=>{throw TypeError(e)};var rb=(e,t,n)=>t in e?nb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $e=(e,t,n)=>rb(e,typeof t!="symbol"?t+"":t,n),Hc=(e,t,n)=>t.has(e)||$m("Cannot "+n);var j=(e,t,n)=>(Hc(e,t,"read from private field"),n?n.call(e):t.get(e)),_e=(e,t,n)=>t.has(e)?$m("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),de=(e,t,n,i)=>(Hc(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),je=(e,t,n)=>(Hc(e,t,"access private method"),n);var pa=(e,t,n,i)=>({set _(o){de(e,t,o,n)},get _(){return j(e,t,i)}});function ib(e,t){for(var n=0;ni[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();function Qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qc={exports:{}},go={},Wc={exports:{}},De={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Vm;function sb(){if(Vm)return De;Vm=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,_={};function E(L,H,A){this.props=L,this.context=H,this.refs=_,this.updater=A||v}E.prototype.isReactComponent={},E.prototype.setState=function(L,H){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,H,"setState")},E.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function k(){}k.prototype=E.prototype;function P(L,H,A){this.props=L,this.context=H,this.refs=_,this.updater=A||v}var C=P.prototype=new k;C.constructor=P,R(C,E.prototype),C.isPureReactComponent=!0;var D=Array.isArray,V=Object.prototype.hasOwnProperty,O={current:null},Q={key:!0,ref:!0,__self:!0,__source:!0};function z(L,H,A){var ye,be={},ne=null,Ce=null;if(H!=null)for(ye in H.ref!==void 0&&(Ce=H.ref),H.key!==void 0&&(ne=""+H.key),H)V.call(H,ye)&&!Q.hasOwnProperty(ye)&&(be[ye]=H[ye]);var Ne=arguments.length-2;if(Ne===1)be.children=A;else if(1>>1,H=ee[L];if(0>>1;Lo(be,S))neo(Ce,be)?(ee[L]=Ce,ee[ne]=S,L=ne):(ee[L]=be,ee[ye]=S,L=ye);else if(neo(Ce,S))ee[L]=Ce,ee[ne]=S,L=ne;else break e}}return ae}function o(ee,ae){var S=ee.sortIndex-ae.sortIndex;return S!==0?S:ee.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],p=[],m=1,y=null,x=3,v=!1,R=!1,_=!1,E=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(ee){for(var ae=n(p);ae!==null;){if(ae.callback===null)i(p);else if(ae.startTime<=ee)i(p),ae.sortIndex=ae.expirationTime,t(h,ae);else break;ae=n(p)}}function D(ee){if(_=!1,C(ee),!R)if(n(h)!==null)R=!0,ce(V);else{var ae=n(p);ae!==null&&xe(D,ae.startTime-ee)}}function V(ee,ae){R=!1,_&&(_=!1,k(z),z=-1),v=!0;var S=x;try{for(C(ae),y=n(h);y!==null&&(!(y.expirationTime>ae)||ee&&!Z());){var L=y.callback;if(typeof L=="function"){y.callback=null,x=y.priorityLevel;var H=L(y.expirationTime<=ae);ae=e.unstable_now(),typeof H=="function"?y.callback=H:y===n(h)&&i(h),C(ae)}else i(h);y=n(h)}if(y!==null)var A=!0;else{var ye=n(p);ye!==null&&xe(D,ye.startTime-ae),A=!1}return A}finally{y=null,x=S,v=!1}}var O=!1,Q=null,z=-1,K=5,G=-1;function Z(){return!(e.unstable_now()-Gee||125L?(ee.sortIndex=S,t(p,ee),n(h)===null&&ee===n(p)&&(_?(k(z),z=-1):_=!0,xe(D,S-L))):(ee.sortIndex=H,t(h,ee),R||v||(R=!0,ce(V))),ee},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(ee){var ae=x;return function(){var S=x;x=ae;try{return ee.apply(this,arguments)}finally{x=S}}}})(Yc)),Yc}var Km;function ub(){return Km||(Km=1,Kc.exports=ab()),Kc.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ym;function cb(){if(Ym)return Qt;Ym=1;var e=gd(),t=ub();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,l=1;l"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},y={};function x(r){return h.call(y,r)?!0:h.call(m,r)?!1:p.test(r)?y[r]=!0:(m[r]=!0,!1)}function v(r,s,l,c){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return c?!1:l!==null?!l.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function R(r,s,l,c){if(s===null||typeof s>"u"||v(r,s,l,c))return!0;if(c)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function _(r,s,l,c,d,g,b){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=c,this.attributeNamespace=d,this.mustUseProperty=l,this.propertyName=r,this.type=s,this.sanitizeURL=g,this.removeEmptyString=b}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){E[r]=new _(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];E[s]=new _(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){E[r]=new _(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){E[r]=new _(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){E[r]=new _(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){E[r]=new _(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){E[r]=new _(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){E[r]=new _(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){E[r]=new _(r,5,!1,r.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function P(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(k,P);E[s]=new _(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(k,P);E[s]=new _(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(k,P);E[s]=new _(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){E[r]=new _(r,1,!1,r.toLowerCase(),null,!1,!1)}),E.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){E[r]=new _(r,1,!1,r.toLowerCase(),null,!0,!0)});function C(r,s,l,c){var d=E.hasOwnProperty(s)?E[s]:null;(d!==null?d.type!==0:c||!(2T||d[b]!==g[T]){var I=` `+d[b].replace(" at new "," at ");return r.displayName&&I.includes("")&&(I=I.replace("",r.displayName)),I}while(1<=b&&0<=T);break}}}finally{A=!1,Error.prepareStackTrace=l}return(r=r?r.displayName||r.name:"")?H(r):""}function be(r){switch(r.tag){case 5:return H(r.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return r=ye(r.type,!1),r;case 11:return r=ye(r.type.render,!1),r;case 1:return r=ye(r.type,!0),r;default:return""}}function ne(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Q:return"Fragment";case O:return"Portal";case K:return"Profiler";case z:return"StrictMode";case ue:return"Suspense";case W:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Z:return(r.displayName||"Context")+".Consumer";case G:return(r._context.displayName||"Context")+".Provider";case re:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Y:return s=r.displayName||null,s!==null?s:ne(r.type)||"Memo";case ce:s=r._payload,r=r._init;try{return ne(r(s))}catch{}}return null}function Ce(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(s);case 8:return s===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ne(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ke(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ge(r){var s=ke(r)?"checked":"value",l=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),c=""+r[s];if(!r.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,g=l.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return d.call(this)},set:function(b){c=""+b,g.call(this,b)}}),Object.defineProperty(r,s,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(b){c=""+b},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function xt(r){r._valueTracker||(r._valueTracker=Ge(r))}function ft(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var l=s.getValue(),c="";return r&&(c=ke(r)?r.checked?"true":"false":r.value),r=c,r!==l?(s.setValue(r),!0):!1}function tn(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Ut(r,s){var l=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??r._wrapperState.initialChecked})}function Dt(r,s){var l=s.defaultValue==null?"":s.defaultValue,c=s.checked!=null?s.checked:s.defaultChecked;l=Ne(s.value!=null?s.value:l),r._wrapperState={initialChecked:c,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Te(r,s){s=s.checked,s!=null&&C(r,"checked",s,!1)}function lt(r,s){Te(r,s);var l=Ne(s.value),c=s.type;if(l!=null)c==="number"?(l===0&&r.value===""||r.value!=l)&&(r.value=""+l):r.value!==""+l&&(r.value=""+l);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Bt(r,s.type,l):s.hasOwnProperty("defaultValue")&&Bt(r,s.type,Ne(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function nn(r,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var c=s.type;if(!(c!=="submit"&&c!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,l||s===r.value||(r.value=s),r.defaultValue=s}l=r.name,l!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,l!==""&&(r.name=l)}function Bt(r,s,l){(s!=="number"||tn(r.ownerDocument)!==r)&&(l==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+l&&(r.defaultValue=""+l))}var Sn=Array.isArray;function jn(r,s,l,c){if(r=r.options,s){s={};for(var d=0;d"+s.valueOf().toString()+"",s=Ae.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function ze(r,s){if(s){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=s;return}}r.textContent=s}var wt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jn=["Webkit","ms","Moz","O"];Object.keys(wt).forEach(function(r){Jn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),wt[s]=wt[r]})});function dn(r,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||wt.hasOwnProperty(r)&&wt[r]?(""+s).trim():s+"px"}function dr(r,s){r=r.style;for(var l in s)if(s.hasOwnProperty(l)){var c=l.indexOf("--")===0,d=dn(l,s[l],c);l==="float"&&(l="cssFloat"),c?r.setProperty(l,d):r[l]=d}}var Gr=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bt(r,s){if(s){if(Gr[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Fn(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rn=null;function su(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ou=null,Li=null,Di=null;function sh(r){if(r=eo(r)){if(typeof ou!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Rl(s),ou(r.stateNode,r.type,s))}}function oh(r){Li?Di?Di.push(r):Di=[r]:Li=r}function lh(){if(Li){var r=Li,s=Di;if(Di=Li=null,sh(r),s)for(r=0;r>>=0,r===0?32:31-(v0(r)/x0|0)|0}var fl=64,dl=4194304;function js(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function hl(r,s){var l=r.pendingLanes;if(l===0)return 0;var c=0,d=r.suspendedLanes,g=r.pingedLanes,b=l&268435455;if(b!==0){var T=b&~d;T!==0?c=js(T):(g&=b,g!==0&&(c=js(g)))}else b=l&~d,b!==0?c=js(b):g!==0&&(c=js(g));if(c===0)return 0;if(s!==0&&s!==c&&(s&d)===0&&(d=c&-c,g=s&-s,d>=g||d===16&&(g&4194240)!==0))return s;if((c&4)!==0&&(c|=l&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=c;0l;l++)s.push(r);return s}function Fs(r,s,l){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-_n(s),r[s]=l}function S0(r,s){var l=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0=qs),Dh=" ",jh=!1;function Fh(r,s){switch(r){case"keyup":return X0.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Mi=!1;function Z0(r,s){switch(r){case"compositionend":return Mh(s);case"keypress":return s.which!==32?null:(jh=!0,Dh);case"textInput":return r=s.data,r===Dh&&jh?null:r;default:return null}}function e1(r,s){if(Mi)return r==="compositionend"||!Eu&&Fh(r,s)?(r=Rh(),vl=vu=yr=null,Mi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:l,offset:s-r};r=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=qh(l)}}function Qh(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Qh(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Kh(){for(var r=window,s=tn();s instanceof r.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)r=s.contentWindow;else break;s=tn(r.document)}return s}function Au(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function u1(r){var s=Kh(),l=r.focusedElem,c=r.selectionRange;if(s!==l&&l&&l.ownerDocument&&Qh(l.ownerDocument.documentElement,l)){if(c!==null&&Au(l)){if(s=c.start,r=c.end,r===void 0&&(r=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(r,l.value.length);else if(r=(s=l.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var d=l.textContent.length,g=Math.min(c.start,d);c=c.end===void 0?g:Math.min(c.end,d),!r.extend&&g>c&&(d=c,c=g,g=d),d=Wh(l,g);var b=Wh(l,c);d&&b&&(r.rangeCount!==1||r.anchorNode!==d.node||r.anchorOffset!==d.offset||r.focusNode!==b.node||r.focusOffset!==b.offset)&&(s=s.createRange(),s.setStart(d.node,d.offset),r.removeAllRanges(),g>c?(r.addRange(s),r.extend(b.node,b.offset)):(s.setEnd(b.node,b.offset),r.addRange(s)))}}for(s=[],r=l;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l=document.documentMode,zi=null,Tu=null,Ys=null,Ru=!1;function Yh(r,s,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ru||zi==null||zi!==tn(c)||(c=zi,"selectionStart"in c&&Au(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ys&&Ks(Ys,c)||(Ys=c,c=Cl(Tu,"onSelect"),0Hi||(r.current=Bu[Hi],Bu[Hi]=null,Hi--)}function Qe(r,s){Hi++,Bu[Hi]=r.current,r.current=s}var br={},At=wr(br),$t=wr(!1),Zr=br;function qi(r,s){var l=r.type.contextTypes;if(!l)return br;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===s)return c.__reactInternalMemoizedMaskedChildContext;var d={},g;for(g in l)d[g]=s[g];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=d),d}function Vt(r){return r=r.childContextTypes,r!=null}function Pl(){Je($t),Je(At)}function cp(r,s,l){if(At.current!==br)throw Error(n(168));Qe(At,s),Qe($t,l)}function fp(r,s,l){var c=r.stateNode;if(s=s.childContextTypes,typeof c.getChildContext!="function")return l;c=c.getChildContext();for(var d in c)if(!(d in s))throw Error(n(108,Ce(r)||"Unknown",d));return S({},l,c)}function Nl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||br,Zr=At.current,Qe(At,r),Qe($t,$t.current),!0}function dp(r,s,l){var c=r.stateNode;if(!c)throw Error(n(169));l?(r=fp(r,s,Zr),c.__reactInternalMemoizedMergedChildContext=r,Je($t),Je(At),Qe(At,r)):Je($t),Qe($t,l)}var er=null,Ol=!1,$u=!1;function hp(r){er===null?er=[r]:er.push(r)}function b1(r){Ol=!0,hp(r)}function kr(){if(!$u&&er!==null){$u=!0;var r=0,s=qe;try{var l=er;for(qe=1;r>=b,d-=b,tr=1<<32-_n(s)+d|l<Re?(yt=Ee,Ee=null):yt=Ee.sibling;var Be=X(U,Ee,B[Re],se);if(Be===null){Ee===null&&(Ee=yt);break}r&&Ee&&Be.alternate===null&&s(U,Ee),F=g(Be,F,Re),Se===null?we=Be:Se.sibling=Be,Se=Be,Ee=yt}if(Re===B.length)return l(U,Ee),Ze&&ti(U,Re),we;if(Ee===null){for(;ReRe?(yt=Ee,Ee=null):yt=Ee.sibling;var Nr=X(U,Ee,Be.value,se);if(Nr===null){Ee===null&&(Ee=yt);break}r&&Ee&&Nr.alternate===null&&s(U,Ee),F=g(Nr,F,Re),Se===null?we=Nr:Se.sibling=Nr,Se=Nr,Ee=yt}if(Be.done)return l(U,Ee),Ze&&ti(U,Re),we;if(Ee===null){for(;!Be.done;Re++,Be=B.next())Be=te(U,Be.value,se),Be!==null&&(F=g(Be,F,Re),Se===null?we=Be:Se.sibling=Be,Se=Be);return Ze&&ti(U,Re),we}for(Ee=c(U,Ee);!Be.done;Re++,Be=B.next())Be=fe(Ee,U,Re,Be.value,se),Be!==null&&(r&&Be.alternate!==null&&Ee.delete(Be.key===null?Re:Be.key),F=g(Be,F,Re),Se===null?we=Be:Se.sibling=Be,Se=Be);return r&&Ee.forEach(function(tb){return s(U,tb)}),Ze&&ti(U,Re),we}function st(U,F,B,se){if(typeof B=="object"&&B!==null&&B.type===Q&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case V:e:{for(var we=B.key,Se=F;Se!==null;){if(Se.key===we){if(we=B.type,we===Q){if(Se.tag===7){l(U,Se.sibling),F=d(Se,B.props.children),F.return=U,U=F;break e}}else if(Se.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===ce&&xp(we)===Se.type){l(U,Se.sibling),F=d(Se,B.props),F.ref=to(U,Se,B),F.return=U,U=F;break e}l(U,Se);break}else s(U,Se);Se=Se.sibling}B.type===Q?(F=ui(B.props.children,U.mode,se,B.key),F.return=U,U=F):(se=oa(B.type,B.key,B.props,null,U.mode,se),se.ref=to(U,F,B),se.return=U,U=se)}return b(U);case O:e:{for(Se=B.key;F!==null;){if(F.key===Se)if(F.tag===4&&F.stateNode.containerInfo===B.containerInfo&&F.stateNode.implementation===B.implementation){l(U,F.sibling),F=d(F,B.children||[]),F.return=U,U=F;break e}else{l(U,F);break}else s(U,F);F=F.sibling}F=zc(B,U.mode,se),F.return=U,U=F}return b(U);case ce:return Se=B._init,st(U,F,Se(B._payload),se)}if(Sn(B))return pe(U,F,B,se);if(ae(B))return ve(U,F,B,se);jl(U,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,F!==null&&F.tag===6?(l(U,F.sibling),F=d(F,B),F.return=U,U=F):(l(U,F),F=Mc(B,U.mode,se),F.return=U,U=F),b(U)):l(U,F)}return st}var Yi=wp(!0),bp=wp(!1),Fl=wr(null),Ml=null,Gi=null,Ku=null;function Yu(){Ku=Gi=Ml=null}function Gu(r){var s=Fl.current;Je(Fl),r._currentValue=s}function Xu(r,s,l){for(;r!==null;){var c=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,c!==null&&(c.childLanes|=s)):c!==null&&(c.childLanes&s)!==s&&(c.childLanes|=s),r===l)break;r=r.return}}function Xi(r,s){Ml=r,Ku=Gi=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(Ht=!0),r.firstContext=null)}function mn(r){var s=r._currentValue;if(Ku!==r)if(r={context:r,memoizedValue:s,next:null},Gi===null){if(Ml===null)throw Error(n(308));Gi=r,Ml.dependencies={lanes:0,firstContext:r}}else Gi=Gi.next=r;return s}var ni=null;function Ju(r){ni===null?ni=[r]:ni.push(r)}function kp(r,s,l,c){var d=s.interleaved;return d===null?(l.next=l,Ju(s)):(l.next=d.next,d.next=l),s.interleaved=l,rr(r,c)}function rr(r,s){r.lanes|=s;var l=r.alternate;for(l!==null&&(l.lanes|=s),l=r,r=r.return;r!==null;)r.childLanes|=s,l=r.alternate,l!==null&&(l.childLanes|=s),l=r,r=r.return;return l.tag===3?l.stateNode:null}var Sr=!1;function Zu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sp(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function ir(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function Er(r,s,l){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(Ue&2)!==0){var d=c.pending;return d===null?s.next=s:(s.next=d.next,d.next=s),c.pending=s,rr(r,l)}return d=c.interleaved,d===null?(s.next=s,Ju(c)):(s.next=d.next,d.next=s),c.interleaved=s,rr(r,l)}function zl(r,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var c=s.lanes;c&=r.pendingLanes,l|=c,s.lanes=l,hu(r,l)}}function Ep(r,s){var l=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var d=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var b={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};g===null?d=g=b:g=g.next=b,l=l.next}while(l!==null);g===null?d=g=s:g=g.next=s}else d=g=s;l={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:c.shared,effects:c.effects},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=s:r.next=s,l.lastBaseUpdate=s}function Ul(r,s,l,c){var d=r.updateQueue;Sr=!1;var g=d.firstBaseUpdate,b=d.lastBaseUpdate,T=d.shared.pending;if(T!==null){d.shared.pending=null;var I=T,$=I.next;I.next=null,b===null?g=$:b.next=$,b=I;var J=r.alternate;J!==null&&(J=J.updateQueue,T=J.lastBaseUpdate,T!==b&&(T===null?J.firstBaseUpdate=$:T.next=$,J.lastBaseUpdate=I))}if(g!==null){var te=d.baseState;b=0,J=$=I=null,T=g;do{var X=T.lane,fe=T.eventTime;if((c&X)===X){J!==null&&(J=J.next={eventTime:fe,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var pe=r,ve=T;switch(X=s,fe=l,ve.tag){case 1:if(pe=ve.payload,typeof pe=="function"){te=pe.call(fe,te,X);break e}te=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=ve.payload,X=typeof pe=="function"?pe.call(fe,te,X):pe,X==null)break e;te=S({},te,X);break e;case 2:Sr=!0}}T.callback!==null&&T.lane!==0&&(r.flags|=64,X=d.effects,X===null?d.effects=[T]:X.push(T))}else fe={eventTime:fe,lane:X,tag:T.tag,payload:T.payload,callback:T.callback,next:null},J===null?($=J=fe,I=te):J=J.next=fe,b|=X;if(T=T.next,T===null){if(T=d.shared.pending,T===null)break;X=T,T=X.next,X.next=null,d.lastBaseUpdate=X,d.shared.pending=null}}while(!0);if(J===null&&(I=te),d.baseState=I,d.firstBaseUpdate=$,d.lastBaseUpdate=J,s=d.shared.interleaved,s!==null){d=s;do b|=d.lane,d=d.next;while(d!==s)}else g===null&&(d.shared.lanes=0);si|=b,r.lanes=b,r.memoizedState=te}}function _p(r,s,l){if(r=s.effects,s.effects=null,r!==null)for(s=0;sl?l:4,r(!0);var c=ic.transition;ic.transition={};try{r(!1),s()}finally{qe=l,ic.transition=c}}function Hp(){return gn().memoizedState}function _1(r,s,l){var c=Tr(r);if(l={lane:c,action:l,hasEagerState:!1,eagerState:null,next:null},qp(r))Wp(s,l);else if(l=kp(r,s,l,c),l!==null){var d=Ft();Nn(l,r,c,d),Qp(l,s,c)}}function C1(r,s,l){var c=Tr(r),d={lane:c,action:l,hasEagerState:!1,eagerState:null,next:null};if(qp(r))Wp(s,d);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=s.lastRenderedReducer,g!==null))try{var b=s.lastRenderedState,T=g(b,l);if(d.hasEagerState=!0,d.eagerState=T,Cn(T,b)){var I=s.interleaved;I===null?(d.next=d,Ju(s)):(d.next=I.next,I.next=d),s.interleaved=d;return}}catch{}finally{}l=kp(r,s,d,c),l!==null&&(d=Ft(),Nn(l,r,c,d),Qp(l,s,c))}}function qp(r){var s=r.alternate;return r===tt||s!==null&&s===tt}function Wp(r,s){so=Vl=!0;var l=r.pending;l===null?s.next=s:(s.next=l.next,l.next=s),r.pending=s}function Qp(r,s,l){if((l&4194240)!==0){var c=s.lanes;c&=r.pendingLanes,l|=c,s.lanes=l,hu(r,l)}}var Wl={readContext:mn,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useInsertionEffect:Tt,useLayoutEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useMutableSource:Tt,useSyncExternalStore:Tt,useId:Tt,unstable_isNewReconciler:!1},A1={readContext:mn,useCallback:function(r,s){return Bn().memoizedState=[r,s===void 0?null:s],r},useContext:mn,useEffect:jp,useImperativeHandle:function(r,s,l){return l=l!=null?l.concat([r]):null,Hl(4194308,4,zp.bind(null,s,r),l)},useLayoutEffect:function(r,s){return Hl(4194308,4,r,s)},useInsertionEffect:function(r,s){return Hl(4,2,r,s)},useMemo:function(r,s){var l=Bn();return s=s===void 0?null:s,r=r(),l.memoizedState=[r,s],r},useReducer:function(r,s,l){var c=Bn();return s=l!==void 0?l(s):s,c.memoizedState=c.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},c.queue=r,r=r.dispatch=_1.bind(null,tt,r),[c.memoizedState,r]},useRef:function(r){var s=Bn();return r={current:r},s.memoizedState=r},useState:Lp,useDebugValue:fc,useDeferredValue:function(r){return Bn().memoizedState=r},useTransition:function(){var r=Lp(!1),s=r[0];return r=E1.bind(null,r[1]),Bn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,l){var c=tt,d=Bn();if(Ze){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),gt===null)throw Error(n(349));(ii&30)!==0||Rp(c,s,l)}d.memoizedState=l;var g={value:l,getSnapshot:s};return d.queue=g,jp(Np.bind(null,c,g,r),[r]),c.flags|=2048,ao(9,Pp.bind(null,c,g,l,s),void 0,null),l},useId:function(){var r=Bn(),s=gt.identifierPrefix;if(Ze){var l=nr,c=tr;l=(c&~(1<<32-_n(c)-1)).toString(32)+l,s=":"+s+"R"+l,l=oo++,0<\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=b.createElement(l,{is:c.is}):(r=b.createElement(l),l==="select"&&(b=r,c.multiple?b.multiple=!0:c.size&&(b.size=c.size))):r=b.createElementNS(r,l),r[zn]=s,r[Zs]=c,hm(r,s,!1,!1),s.stateNode=r;e:{switch(b=Fn(l,c),l){case"dialog":Xe("cancel",r),Xe("close",r),d=c;break;case"iframe":case"object":case"embed":Xe("load",r),d=c;break;case"video":case"audio":for(d=0;dns&&(s.flags|=128,c=!0,uo(g,!1),s.lanes=4194304)}else{if(!c)if(r=Bl(b),r!==null){if(s.flags|=128,c=!0,l=r.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),uo(g,!0),g.tail===null&&g.tailMode==="hidden"&&!b.alternate&&!Ze)return Rt(s),null}else 2*it()-g.renderingStartTime>ns&&l!==1073741824&&(s.flags|=128,c=!0,uo(g,!1),s.lanes=4194304);g.isBackwards?(b.sibling=s.child,s.child=b):(l=g.last,l!==null?l.sibling=b:s.child=b,g.last=b)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=it(),s.sibling=null,l=et.current,Qe(et,c?l&1|2:l&1),s):(Rt(s),null);case 22:case 23:return Dc(),c=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(s.flags|=8192),c&&(s.mode&1)!==0?(an&1073741824)!==0&&(Rt(s),s.subtreeFlags&6&&(s.flags|=8192)):Rt(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function D1(r,s){switch(Hu(s),s.tag){case 1:return Vt(s.type)&&Pl(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Ji(),Je($t),Je(At),rc(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return tc(s),null;case 13:if(Je(et),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Ki()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return Je(et),null;case 4:return Ji(),null;case 10:return Gu(s.type._context),null;case 22:case 23:return Dc(),null;case 24:return null;default:return null}}var Gl=!1,Pt=!1,j1=typeof WeakSet=="function"?WeakSet:Set,he=null;function es(r,s){var l=r.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(c){nt(r,s,c)}else l.current=null}function Sc(r,s,l){try{l()}catch(c){nt(r,s,c)}}var gm=!1;function F1(r,s){if(Du=gl,r=Kh(),Au(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var d=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var b=0,T=-1,I=-1,$=0,J=0,te=r,X=null;t:for(;;){for(var fe;te!==l||d!==0&&te.nodeType!==3||(T=b+d),te!==g||c!==0&&te.nodeType!==3||(I=b+c),te.nodeType===3&&(b+=te.nodeValue.length),(fe=te.firstChild)!==null;)X=te,te=fe;for(;;){if(te===r)break t;if(X===l&&++$===d&&(T=b),X===g&&++J===c&&(I=b),(fe=te.nextSibling)!==null)break;te=X,X=te.parentNode}te=fe}l=T===-1||I===-1?null:{start:T,end:I}}else l=null}l=l||{start:0,end:0}}else l=null;for(ju={focusedElem:r,selectionRange:l},gl=!1,he=s;he!==null;)if(s=he,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,he=r;else for(;he!==null;){s=he;try{var pe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var ve=pe.memoizedProps,st=pe.memoizedState,U=s.stateNode,F=U.getSnapshotBeforeUpdate(s.elementType===s.type?ve:Tn(s.type,ve),st);U.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var B=s.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(se){nt(s,s.return,se)}if(r=s.sibling,r!==null){r.return=s.return,he=r;break}he=s.return}return pe=gm,gm=!1,pe}function co(r,s,l){var c=s.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&r)===r){var g=d.destroy;d.destroy=void 0,g!==void 0&&Sc(s,l,g)}d=d.next}while(d!==c)}}function Xl(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&r)===r){var c=l.create;l.destroy=c()}l=l.next}while(l!==s)}}function Ec(r){var s=r.ref;if(s!==null){var l=r.stateNode;switch(r.tag){case 5:r=l;break;default:r=l}typeof s=="function"?s(r):s.current=r}}function ym(r){var s=r.alternate;s!==null&&(r.alternate=null,ym(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[zn],delete s[Zs],delete s[Uu],delete s[x1],delete s[w1])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function vm(r){return r.tag===5||r.tag===3||r.tag===4}function xm(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||vm(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function _c(r,s,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(r,s):l.insertBefore(r,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(r,l)):(s=l,s.appendChild(r)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Tl));else if(c!==4&&(r=r.child,r!==null))for(_c(r,s,l),r=r.sibling;r!==null;)_c(r,s,l),r=r.sibling}function Cc(r,s,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,s?l.insertBefore(r,s):l.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(Cc(r,s,l),r=r.sibling;r!==null;)Cc(r,s,l),r=r.sibling}var kt=null,Rn=!1;function _r(r,s,l){for(l=l.child;l!==null;)wm(r,s,l),l=l.sibling}function wm(r,s,l){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(cl,l)}catch{}switch(l.tag){case 5:Pt||es(l,s);case 6:var c=kt,d=Rn;kt=null,_r(r,s,l),kt=c,Rn=d,kt!==null&&(Rn?(r=kt,l=l.stateNode,r.nodeType===8?r.parentNode.removeChild(l):r.removeChild(l)):kt.removeChild(l.stateNode));break;case 18:kt!==null&&(Rn?(r=kt,l=l.stateNode,r.nodeType===8?zu(r.parentNode,l):r.nodeType===1&&zu(r,l),$s(r)):zu(kt,l.stateNode));break;case 4:c=kt,d=Rn,kt=l.stateNode.containerInfo,Rn=!0,_r(r,s,l),kt=c,Rn=d;break;case 0:case 11:case 14:case 15:if(!Pt&&(c=l.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var g=d,b=g.destroy;g=g.tag,b!==void 0&&((g&2)!==0||(g&4)!==0)&&Sc(l,s,b),d=d.next}while(d!==c)}_r(r,s,l);break;case 1:if(!Pt&&(es(l,s),c=l.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=l.memoizedProps,c.state=l.memoizedState,c.componentWillUnmount()}catch(T){nt(l,s,T)}_r(r,s,l);break;case 21:_r(r,s,l);break;case 22:l.mode&1?(Pt=(c=Pt)||l.memoizedState!==null,_r(r,s,l),Pt=c):_r(r,s,l);break;default:_r(r,s,l)}}function bm(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var l=r.stateNode;l===null&&(l=r.stateNode=new j1),s.forEach(function(c){var d=W1.bind(null,r,c);l.has(c)||(l.add(c),c.then(d,d))})}}function Pn(r,s){var l=s.deletions;if(l!==null)for(var c=0;cd&&(d=b),c&=~g}if(c=d,c=it()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*z1(c/1960))-c,10r?16:r,Ar===null)var c=!1;else{if(r=Ar,Ar=null,na=0,(Ue&6)!==0)throw Error(n(331));var d=Ue;for(Ue|=4,he=r.current;he!==null;){var g=he,b=g.child;if((he.flags&16)!==0){var T=g.deletions;if(T!==null){for(var I=0;Iit()-Rc?li(r,0):Tc|=l),Wt(r,s)}function Lm(r,s){s===0&&((r.mode&1)===0?s=1:(s=dl,dl<<=1,(dl&130023424)===0&&(dl=4194304)));var l=Ft();r=rr(r,s),r!==null&&(Fs(r,s,l),Wt(r,l))}function q1(r){var s=r.memoizedState,l=0;s!==null&&(l=s.retryLane),Lm(r,l)}function W1(r,s){var l=0;switch(r.tag){case 13:var c=r.stateNode,d=r.memoizedState;d!==null&&(l=d.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(n(314))}c!==null&&c.delete(s),Lm(r,l)}var Dm;Dm=function(r,s,l){if(r!==null)if(r.memoizedProps!==s.pendingProps||$t.current)Ht=!0;else{if((r.lanes&l)===0&&(s.flags&128)===0)return Ht=!1,I1(r,s,l);Ht=(r.flags&131072)!==0}else Ht=!1,Ze&&(s.flags&1048576)!==0&&pp(s,Ll,s.index);switch(s.lanes=0,s.tag){case 2:var c=s.type;Yl(r,s),r=s.pendingProps;var d=qi(s,At.current);Xi(s,l),d=oc(null,s,c,r,d,l);var g=lc();return s.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Vt(c)?(g=!0,Nl(s)):g=!1,s.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Zu(s),d.updater=Ql,s.stateNode=d,d._reactInternals=s,hc(s,c,r,l),s=yc(null,s,c,!0,g,l)):(s.tag=0,Ze&&g&&Vu(s),jt(null,s,d,l),s=s.child),s;case 16:c=s.elementType;e:{switch(Yl(r,s),r=s.pendingProps,d=c._init,c=d(c._payload),s.type=c,d=s.tag=K1(c),r=Tn(c,r),d){case 0:s=gc(null,s,c,r,l);break e;case 1:s=lm(null,s,c,r,l);break e;case 11:s=nm(null,s,c,r,l);break e;case 14:s=rm(null,s,c,Tn(c.type,r),l);break e}throw Error(n(306,c,""))}return s;case 0:return c=s.type,d=s.pendingProps,d=s.elementType===c?d:Tn(c,d),gc(r,s,c,d,l);case 1:return c=s.type,d=s.pendingProps,d=s.elementType===c?d:Tn(c,d),lm(r,s,c,d,l);case 3:e:{if(am(s),r===null)throw Error(n(387));c=s.pendingProps,g=s.memoizedState,d=g.element,Sp(r,s),Ul(s,c,null,l);var b=s.memoizedState;if(c=b.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},s.updateQueue.baseState=g,s.memoizedState=g,s.flags&256){d=Zi(Error(n(423)),s),s=um(r,s,c,l,d);break e}else if(c!==d){d=Zi(Error(n(424)),s),s=um(r,s,c,l,d);break e}else for(ln=xr(s.stateNode.containerInfo.firstChild),on=s,Ze=!0,An=null,l=bp(s,null,c,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ki(),c===d){s=sr(r,s,l);break e}jt(r,s,c,l)}s=s.child}return s;case 5:return Cp(s),r===null&&Wu(s),c=s.type,d=s.pendingProps,g=r!==null?r.memoizedProps:null,b=d.children,Fu(c,d)?b=null:g!==null&&Fu(c,g)&&(s.flags|=32),om(r,s),jt(r,s,b,l),s.child;case 6:return r===null&&Wu(s),null;case 13:return cm(r,s,l);case 4:return ec(s,s.stateNode.containerInfo),c=s.pendingProps,r===null?s.child=Yi(s,null,c,l):jt(r,s,c,l),s.child;case 11:return c=s.type,d=s.pendingProps,d=s.elementType===c?d:Tn(c,d),nm(r,s,c,d,l);case 7:return jt(r,s,s.pendingProps,l),s.child;case 8:return jt(r,s,s.pendingProps.children,l),s.child;case 12:return jt(r,s,s.pendingProps.children,l),s.child;case 10:e:{if(c=s.type._context,d=s.pendingProps,g=s.memoizedProps,b=d.value,Qe(Fl,c._currentValue),c._currentValue=b,g!==null)if(Cn(g.value,b)){if(g.children===d.children&&!$t.current){s=sr(r,s,l);break e}}else for(g=s.child,g!==null&&(g.return=s);g!==null;){var T=g.dependencies;if(T!==null){b=g.child;for(var I=T.firstContext;I!==null;){if(I.context===c){if(g.tag===1){I=ir(-1,l&-l),I.tag=2;var $=g.updateQueue;if($!==null){$=$.shared;var J=$.pending;J===null?I.next=I:(I.next=J.next,J.next=I),$.pending=I}}g.lanes|=l,I=g.alternate,I!==null&&(I.lanes|=l),Xu(g.return,l,s),T.lanes|=l;break}I=I.next}}else if(g.tag===10)b=g.type===s.type?null:g.child;else if(g.tag===18){if(b=g.return,b===null)throw Error(n(341));b.lanes|=l,T=b.alternate,T!==null&&(T.lanes|=l),Xu(b,l,s),b=g.sibling}else b=g.child;if(b!==null)b.return=g;else for(b=g;b!==null;){if(b===s){b=null;break}if(g=b.sibling,g!==null){g.return=b.return,b=g;break}b=b.return}g=b}jt(r,s,d.children,l),s=s.child}return s;case 9:return d=s.type,c=s.pendingProps.children,Xi(s,l),d=mn(d),c=c(d),s.flags|=1,jt(r,s,c,l),s.child;case 14:return c=s.type,d=Tn(c,s.pendingProps),d=Tn(c.type,d),rm(r,s,c,d,l);case 15:return im(r,s,s.type,s.pendingProps,l);case 17:return c=s.type,d=s.pendingProps,d=s.elementType===c?d:Tn(c,d),Yl(r,s),s.tag=1,Vt(c)?(r=!0,Nl(s)):r=!1,Xi(s,l),Yp(s,c,d),hc(s,c,d,l),yc(null,s,c,!0,r,l);case 19:return dm(r,s,l);case 22:return sm(r,s,l)}throw Error(n(156,s.tag))};function jm(r,s){return mh(r,s)}function Q1(r,s,l,c){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(r,s,l,c){return new Q1(r,s,l,c)}function Fc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function K1(r){if(typeof r=="function")return Fc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===re)return 11;if(r===Y)return 14}return 2}function Pr(r,s){var l=r.alternate;return l===null?(l=vn(r.tag,s,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=s,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&14680064,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,s=r.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l}function oa(r,s,l,c,d,g){var b=2;if(c=r,typeof r=="function")Fc(r)&&(b=1);else if(typeof r=="string")b=5;else e:switch(r){case Q:return ui(l.children,d,g,s);case z:b=8,d|=8;break;case K:return r=vn(12,l,s,d|2),r.elementType=K,r.lanes=g,r;case ue:return r=vn(13,l,s,d),r.elementType=ue,r.lanes=g,r;case W:return r=vn(19,l,s,d),r.elementType=W,r.lanes=g,r;case xe:return la(l,d,g,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case G:b=10;break e;case Z:b=9;break e;case re:b=11;break e;case Y:b=14;break e;case ce:b=16,c=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=vn(b,l,s,d),s.elementType=r,s.type=c,s.lanes=g,s}function ui(r,s,l,c){return r=vn(7,r,c,s),r.lanes=l,r}function la(r,s,l,c){return r=vn(22,r,c,s),r.elementType=xe,r.lanes=l,r.stateNode={isHidden:!1},r}function Mc(r,s,l){return r=vn(6,r,null,s),r.lanes=l,r}function zc(r,s,l){return s=vn(4,r.children!==null?r.children:[],r.key,s),s.lanes=l,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function Y1(r,s,l,c,d){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=du(0),this.expirationTimes=du(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=du(0),this.identifierPrefix=c,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Uc(r,s,l,c,d,g,b,T,I){return r=new Y1(r,s,l,T,I),s===1?(s=1,g===!0&&(s|=8)):s=0,g=vn(3,null,null,s),r.current=g,g.stateNode=r,g.memoizedState={element:c,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zu(g),r}function G1(r,s,l){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Qc.exports=cb(),Qc.exports}var Xm;function fb(){if(Xm)return ma;Xm=1;var e=yv();return ma.createRoot=e.createRoot,ma.hydrateRoot=e.hydrateRoot,ma}var db=fb();const hb=Qo(db),pb=20,mb=1e6,fr={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Gc=0;function gb(){return Gc=(Gc+1)%Number.MAX_VALUE,Gc.toString()}const Xc=new Map,Jm=e=>{if(Xc.has(e))return;const t=setTimeout(()=>{Xc.delete(e),No({type:fr.REMOVE_TOAST,toastId:e})},mb);Xc.set(e,t)},yb=(e,t)=>{switch(t.type){case fr.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,pb)};case fr.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case fr.DISMISS_TOAST:{const{toastId:n}=t;return n?Jm(n):e.toasts.forEach(i=>{Jm(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,open:!1}:i)}}case fr.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ra=[];let Pa={toasts:[]};function No(e){Pa=yb(Pa,e),Ra.forEach(t=>{t(Pa)})}function vb({...e}){const t=gb(),n=o=>No({type:fr.UPDATE_TOAST,toast:{...o,id:t}}),i=()=>No({type:fr.DISMISS_TOAST,toastId:t});return No({type:fr.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||i()}}}),{id:t,dismiss:i,update:n}}function xb(){const[e,t]=N.useState(Pa);return N.useEffect(()=>(Ra.push(t),()=>{const n=Ra.indexOf(t);n>-1&&Ra.splice(n,1)}),[e]),{...e,toast:vb,dismiss:n=>No({type:fr.DISMISS_TOAST,toastId:n})}}var yd=yv();const wb=Qo(yd);function cn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Zm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vd(...e){return t=>{let n=!1;const i=e.map(o=>{const a=Zm(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o{var k;const{scope:x,children:v,...R}=y,_=((k=x==null?void 0:x[e])==null?void 0:k[h])||f,E=N.useMemo(()=>R,Object.values(R));return w.jsx(_.Provider,{value:E,children:v})};p.displayName=a+"Provider";function m(y,x){var _;const v=((_=x==null?void 0:x[e])==null?void 0:_[h])||f,R=N.useContext(v);if(R)return R;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${a}\``)}return[p,m]}const o=()=>{const a=n.map(u=>N.createContext(u));return function(f){const h=(f==null?void 0:f[e])||a;return N.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return o.scopeName=e,[i,bb(o,...t)]}function bb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const u=i.reduce((f,{useScope:h,scopeName:p})=>{const y=h(a)[`__scope${p}`];return{...f,...y}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}function eg(e){const t=kb(e),n=N.forwardRef((i,o)=>{const{children:a,...u}=i,f=N.Children.toArray(a),h=f.find(Eb);if(h){const p=h.props.children,m=f.map(y=>y===h?N.Children.count(p)>1?N.Children.only(null):N.isValidElement(p)?p.props.children:null:y);return w.jsx(t,{...u,ref:o,children:N.isValidElement(p)?N.cloneElement(p,void 0,m):null})}return w.jsx(t,{...u,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function kb(e){const t=N.forwardRef((n,i)=>{const{children:o,...a}=n;if(N.isValidElement(o)){const u=Cb(o),f=_b(a,o.props);return o.type!==N.Fragment&&(f.ref=i?vd(i,u):u),N.cloneElement(o,f)}return N.Children.count(o)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Sb=Symbol("radix.slottable");function Eb(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Sb}function _b(e,t){const n={...t};for(const i in t){const o=e[i],a=t[i];/^on[A-Z]/.test(i)?o&&a?n[i]=(...f)=>{const h=a(...f);return o(...f),h}:o&&(n[i]=o):i==="style"?n[i]={...o,...a}:i==="className"&&(n[i]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Cb(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ab(e){const t=e+"CollectionProvider",[n,i]=vv(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=_=>{const{scope:E,children:k}=_,P=Dr.useRef(null),C=Dr.useRef(new Map).current;return w.jsx(o,{scope:E,itemMap:C,collectionRef:P,children:k})};u.displayName=t;const f=e+"CollectionSlot",h=eg(f),p=Dr.forwardRef((_,E)=>{const{scope:k,children:P}=_,C=a(f,k),D=Ai(E,C.collectionRef);return w.jsx(h,{ref:D,children:P})});p.displayName=f;const m=e+"CollectionItemSlot",y="data-radix-collection-item",x=eg(m),v=Dr.forwardRef((_,E)=>{const{scope:k,children:P,...C}=_,D=Dr.useRef(null),V=Ai(E,D),O=a(m,k);return Dr.useEffect(()=>(O.itemMap.set(D,{ref:D,...C}),()=>void O.itemMap.delete(D))),w.jsx(x,{[y]:"",ref:V,children:P})});v.displayName=m;function R(_){const E=a(e+"CollectionConsumer",_);return Dr.useCallback(()=>{const P=E.collectionRef.current;if(!P)return[];const C=Array.from(P.querySelectorAll(`[${y}]`));return Array.from(E.itemMap.values()).sort((O,Q)=>C.indexOf(O.ref.current)-C.indexOf(Q.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:u,Slot:p,ItemSlot:v},R,i]}function Tb(e){const t=Rb(e),n=N.forwardRef((i,o)=>{const{children:a,...u}=i,f=N.Children.toArray(a),h=f.find(Nb);if(h){const p=h.props.children,m=f.map(y=>y===h?N.Children.count(p)>1?N.Children.only(null):N.isValidElement(p)?p.props.children:null:y);return w.jsx(t,{...u,ref:o,children:N.isValidElement(p)?N.cloneElement(p,void 0,m):null})}return w.jsx(t,{...u,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function Rb(e){const t=N.forwardRef((n,i)=>{const{children:o,...a}=n;if(N.isValidElement(o)){const u=Ib(o),f=Ob(a,o.props);return o.type!==N.Fragment&&(f.ref=i?vd(i,u):u),N.cloneElement(o,f)}return N.Children.count(o)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pb=Symbol("radix.slottable");function Nb(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pb}function Ob(e,t){const n={...t};for(const i in t){const o=e[i],a=t[i];/^on[A-Z]/.test(i)?o&&a?n[i]=(...f)=>{const h=a(...f);return o(...f),h}:o&&(n[i]=o):i==="style"?n[i]={...o,...a}:i==="className"&&(n[i]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Ib(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Lb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xn=Lb.reduce((e,t)=>{const n=Tb(`Primitive.${t}`),i=N.forwardRef((o,a)=>{const{asChild:u,...f}=o,h=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(h,{...f,ref:a})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function xv(e,t){e&&yd.flushSync(()=>e.dispatchEvent(t))}function Ti(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}function Db(e,t=globalThis==null?void 0:globalThis.document){const n=Ti(e);N.useEffect(()=>{const i=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var jb="DismissableLayer",Cf="dismissableLayer.update",Fb="dismissableLayer.pointerDownOutside",Mb="dismissableLayer.focusOutside",tg,wv=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bv=N.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:u,onDismiss:f,...h}=e,p=N.useContext(wv),[m,y]=N.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=N.useState({}),R=Ai(t,Q=>y(Q)),_=Array.from(p.layers),[E]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=_.indexOf(E),P=m?_.indexOf(m):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,D=P>=k,V=Ub(Q=>{const z=Q.target,K=[...p.branches].some(G=>G.contains(z));!D||K||(o==null||o(Q),u==null||u(Q),Q.defaultPrevented||f==null||f())},x),O=Bb(Q=>{const z=Q.target;[...p.branches].some(G=>G.contains(z))||(a==null||a(Q),u==null||u(Q),Q.defaultPrevented||f==null||f())},x);return Db(Q=>{P===p.layers.size-1&&(i==null||i(Q),!Q.defaultPrevented&&f&&(Q.preventDefault(),f()))},x),N.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(tg=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),ng(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=tg)}},[m,x,n,p]),N.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),ng())},[m,p]),N.useEffect(()=>{const Q=()=>v({});return document.addEventListener(Cf,Q),()=>document.removeEventListener(Cf,Q)},[]),w.jsx(Xn.div,{...h,ref:R,style:{pointerEvents:C?D?"auto":"none":void 0,...e.style},onFocusCapture:cn(e.onFocusCapture,O.onFocusCapture),onBlurCapture:cn(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:cn(e.onPointerDownCapture,V.onPointerDownCapture)})});bv.displayName=jb;var zb="DismissableLayerBranch",kv=N.forwardRef((e,t)=>{const n=N.useContext(wv),i=N.useRef(null),o=Ai(t,i);return N.useEffect(()=>{const a=i.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),w.jsx(Xn.div,{...e,ref:o})});kv.displayName=zb;function Ub(e,t=globalThis==null?void 0:globalThis.document){const n=Ti(e),i=N.useRef(!1),o=N.useRef(()=>{});return N.useEffect(()=>{const a=f=>{if(f.target&&!i.current){let h=function(){Sv(Fb,n,p,{discrete:!0})};const p={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);i.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function Bb(e,t=globalThis==null?void 0:globalThis.document){const n=Ti(e),i=N.useRef(!1);return N.useEffect(()=>{const o=a=>{a.target&&!i.current&&Sv(Mb,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function ng(){const e=new CustomEvent(Cf);document.dispatchEvent(e)}function Sv(e,t,n,{discrete:i}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?xv(o,a):o.dispatchEvent(a)}var $b=bv,Vb=kv,jo=globalThis!=null&&globalThis.document?N.useLayoutEffect:()=>{},Hb="Portal",Ev=N.forwardRef((e,t)=>{var f;const{container:n,...i}=e,[o,a]=N.useState(!1);jo(()=>a(!0),[]);const u=n||o&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return u?wb.createPortal(w.jsx(Xn.div,{...i,ref:t}),u):null});Ev.displayName=Hb;function qb(e,t){return N.useReducer((n,i)=>t[n][i]??n,e)}var _v=e=>{const{present:t,children:n}=e,i=Wb(t),o=typeof n=="function"?n({present:i.isPresent}):N.Children.only(n),a=Ai(i.ref,Qb(o));return typeof n=="function"||i.isPresent?N.cloneElement(o,{ref:a}):null};_v.displayName="Presence";function Wb(e){const[t,n]=N.useState(),i=N.useRef(null),o=N.useRef(e),a=N.useRef("none"),u=e?"mounted":"unmounted",[f,h]=qb(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const p=ga(i.current);a.current=f==="mounted"?p:"none"},[f]),jo(()=>{const p=i.current,m=o.current;if(m!==e){const x=a.current,v=ga(p);e?h("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?h("UNMOUNT"):h(m&&x!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),jo(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,y=v=>{const _=ga(i.current).includes(CSS.escape(v.animationName));if(v.target===t&&_&&(h("ANIMATION_END"),!o.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},x=v=>{v.target===t&&(a.current=ga(i.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:N.useCallback(p=>{i.current=p?getComputedStyle(p):null,n(p)},[])}}function ga(e){return(e==null?void 0:e.animationName)||"none"}function Qb(e){var i,o;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kb=gv[" useInsertionEffect ".trim().toString()]||jo;function Yb({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[o,a,u]=Gb({defaultProp:t,onChange:n}),f=e!==void 0,h=f?e:o;{const m=N.useRef(e!==void 0);N.useEffect(()=>{const y=m.current;y!==f&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=f},[f,i])}const p=N.useCallback(m=>{var y;if(f){const x=Xb(m)?m(e):m;x!==e&&((y=u.current)==null||y.call(u,x))}else a(m)},[f,e,a,u]);return[h,p]}function Gb({defaultProp:e,onChange:t}){const[n,i]=N.useState(e),o=N.useRef(n),a=N.useRef(t);return Kb(()=>{a.current=t},[t]),N.useEffect(()=>{var u;o.current!==n&&((u=a.current)==null||u.call(a,n),o.current=n)},[n,o]),[n,i,a]}function Xb(e){return typeof e=="function"}var Jb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zb="VisuallyHidden",xd=N.forwardRef((e,t)=>w.jsx(Xn.span,{...e,ref:t,style:{...Jb,...e.style}}));xd.displayName=Zb;var wd="ToastProvider",[bd,ek,tk]=Ab("Toast"),[Cv]=vv("Toast",[tk]),[nk,Ya]=Cv(wd),Av=e=>{const{__scopeToast:t,label:n="Notification",duration:i=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:u}=e,[f,h]=N.useState(null),[p,m]=N.useState(0),y=N.useRef(!1),x=N.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wd}\`. Expected non-empty \`string\`.`),w.jsx(bd.Provider,{scope:t,children:w.jsx(nk,{scope:t,label:n,duration:i,swipeDirection:o,swipeThreshold:a,toastCount:p,viewport:f,onViewportChange:h,onToastAdd:N.useCallback(()=>m(v=>v+1),[]),onToastRemove:N.useCallback(()=>m(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:x,children:u})})};Av.displayName=wd;var Tv="ToastViewport",rk=["F8"],Af="toast.viewportPause",Tf="toast.viewportResume",Rv=N.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:i=rk,label:o="Notifications ({hotkey})",...a}=e,u=Ya(Tv,n),f=ek(n),h=N.useRef(null),p=N.useRef(null),m=N.useRef(null),y=N.useRef(null),x=Ai(t,y,u.onViewportChange),v=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=u.toastCount>0;N.useEffect(()=>{const E=k=>{var C;i.length!==0&&i.every(D=>k[D]||k.code===D)&&((C=y.current)==null||C.focus())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[i]),N.useEffect(()=>{const E=h.current,k=y.current;if(R&&E&&k){const P=()=>{if(!u.isClosePausedRef.current){const O=new CustomEvent(Af);k.dispatchEvent(O),u.isClosePausedRef.current=!0}},C=()=>{if(u.isClosePausedRef.current){const O=new CustomEvent(Tf);k.dispatchEvent(O),u.isClosePausedRef.current=!1}},D=O=>{!E.contains(O.relatedTarget)&&C()},V=()=>{E.contains(document.activeElement)||C()};return E.addEventListener("focusin",P),E.addEventListener("focusout",D),E.addEventListener("pointermove",P),E.addEventListener("pointerleave",V),window.addEventListener("blur",P),window.addEventListener("focus",C),()=>{E.removeEventListener("focusin",P),E.removeEventListener("focusout",D),E.removeEventListener("pointermove",P),E.removeEventListener("pointerleave",V),window.removeEventListener("blur",P),window.removeEventListener("focus",C)}}},[R,u.isClosePausedRef]);const _=N.useCallback(({tabbingDirection:E})=>{const P=f().map(C=>{const D=C.ref.current,V=[D,...gk(D)];return E==="forwards"?V:V.reverse()});return(E==="forwards"?P.reverse():P).flat()},[f]);return N.useEffect(()=>{const E=y.current;if(E){const k=P=>{var V,O,Q;const C=P.altKey||P.ctrlKey||P.metaKey;if(P.key==="Tab"&&!C){const z=document.activeElement,K=P.shiftKey;if(P.target===E&&K){(V=p.current)==null||V.focus();return}const re=_({tabbingDirection:K?"backwards":"forwards"}),ue=re.findIndex(W=>W===z);Jc(re.slice(ue+1))?P.preventDefault():K?(O=p.current)==null||O.focus():(Q=m.current)==null||Q.focus()}};return E.addEventListener("keydown",k),()=>E.removeEventListener("keydown",k)}},[f,_]),w.jsxs(Vb,{ref:h,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:R?void 0:"none"},children:[R&&w.jsx(Rf,{ref:p,onFocusFromOutsideViewport:()=>{const E=_({tabbingDirection:"forwards"});Jc(E)}}),w.jsx(bd.Slot,{scope:n,children:w.jsx(Xn.ol,{tabIndex:-1,...a,ref:x})}),R&&w.jsx(Rf,{ref:m,onFocusFromOutsideViewport:()=>{const E=_({tabbingDirection:"backwards"});Jc(E)}})]})});Rv.displayName=Tv;var Pv="ToastFocusProxy",Rf=N.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:i,...o}=e,a=Ya(Pv,n);return w.jsx(xd,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:u=>{var p;const f=u.relatedTarget;!((p=a.viewport)!=null&&p.contains(f))&&i()}})});Rf.displayName=Pv;var Ko="Toast",ik="toast.swipeStart",sk="toast.swipeMove",ok="toast.swipeCancel",lk="toast.swipeEnd",Nv=N.forwardRef((e,t)=>{const{forceMount:n,open:i,defaultOpen:o,onOpenChange:a,...u}=e,[f,h]=Yb({prop:i,defaultProp:o??!0,onChange:a,caller:Ko});return w.jsx(_v,{present:n||f,children:w.jsx(ck,{open:f,...u,ref:t,onClose:()=>h(!1),onPause:Ti(e.onPause),onResume:Ti(e.onResume),onSwipeStart:cn(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:cn(e.onSwipeMove,p=>{const{x:m,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:cn(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:cn(e.onSwipeEnd,p=>{const{x:m,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),h(!1)})})})});Nv.displayName=Ko;var[ak,uk]=Cv(Ko,{onClose(){}}),ck=N.forwardRef((e,t)=>{const{__scopeToast:n,type:i="foreground",duration:o,open:a,onClose:u,onEscapeKeyDown:f,onPause:h,onResume:p,onSwipeStart:m,onSwipeMove:y,onSwipeCancel:x,onSwipeEnd:v,...R}=e,_=Ya(Ko,n),[E,k]=N.useState(null),P=Ai(t,W=>k(W)),C=N.useRef(null),D=N.useRef(null),V=o||_.duration,O=N.useRef(0),Q=N.useRef(V),z=N.useRef(0),{onToastAdd:K,onToastRemove:G}=_,Z=Ti(()=>{var Y;(E==null?void 0:E.contains(document.activeElement))&&((Y=_.viewport)==null||Y.focus()),u()}),re=N.useCallback(W=>{!W||W===1/0||(window.clearTimeout(z.current),O.current=new Date().getTime(),z.current=window.setTimeout(Z,W))},[Z]);N.useEffect(()=>{const W=_.viewport;if(W){const Y=()=>{re(Q.current),p==null||p()},ce=()=>{const xe=new Date().getTime()-O.current;Q.current=Q.current-xe,window.clearTimeout(z.current),h==null||h()};return W.addEventListener(Af,ce),W.addEventListener(Tf,Y),()=>{W.removeEventListener(Af,ce),W.removeEventListener(Tf,Y)}}},[_.viewport,V,h,p,re]),N.useEffect(()=>{a&&!_.isClosePausedRef.current&&re(V)},[a,V,_.isClosePausedRef,re]),N.useEffect(()=>(K(),()=>G()),[K,G]);const ue=N.useMemo(()=>E?Mv(E):null,[E]);return _.viewport?w.jsxs(w.Fragment,{children:[ue&&w.jsx(fk,{__scopeToast:n,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:ue}),w.jsx(ak,{scope:n,onClose:Z,children:yd.createPortal(w.jsx(bd.ItemSlot,{scope:n,children:w.jsx($b,{asChild:!0,onEscapeKeyDown:cn(f,()=>{_.isFocusedToastEscapeKeyDownRef.current||Z(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Xn.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":_.swipeDirection,...R,ref:P,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:cn(e.onKeyDown,W=>{W.key==="Escape"&&(f==null||f(W.nativeEvent),W.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:cn(e.onPointerDown,W=>{W.button===0&&(C.current={x:W.clientX,y:W.clientY})}),onPointerMove:cn(e.onPointerMove,W=>{if(!C.current)return;const Y=W.clientX-C.current.x,ce=W.clientY-C.current.y,xe=!!D.current,ee=["left","right"].includes(_.swipeDirection),ae=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,S=ee?ae(0,Y):0,L=ee?0:ae(0,ce),H=W.pointerType==="touch"?10:2,A={x:S,y:L},ye={originalEvent:W,delta:A};xe?(D.current=A,ya(sk,y,ye,{discrete:!1})):rg(A,_.swipeDirection,H)?(D.current=A,ya(ik,m,ye,{discrete:!1}),W.target.setPointerCapture(W.pointerId)):(Math.abs(Y)>H||Math.abs(ce)>H)&&(C.current=null)}),onPointerUp:cn(e.onPointerUp,W=>{const Y=D.current,ce=W.target;if(ce.hasPointerCapture(W.pointerId)&&ce.releasePointerCapture(W.pointerId),D.current=null,C.current=null,Y){const xe=W.currentTarget,ee={originalEvent:W,delta:Y};rg(Y,_.swipeDirection,_.swipeThreshold)?ya(lk,v,ee,{discrete:!0}):ya(ok,x,ee,{discrete:!0}),xe.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),fk=e=>{const{__scopeToast:t,children:n,...i}=e,o=Ya(Ko,t),[a,u]=N.useState(!1),[f,h]=N.useState(!1);return pk(()=>u(!0)),N.useEffect(()=>{const p=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(p)},[]),f?null:w.jsx(Ev,{asChild:!0,children:w.jsx(xd,{...i,children:a&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},dk="ToastTitle",Ov=N.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e;return w.jsx(Xn.div,{...i,ref:t})});Ov.displayName=dk;var hk="ToastDescription",Iv=N.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e;return w.jsx(Xn.div,{...i,ref:t})});Iv.displayName=hk;var Lv="ToastAction",Dv=N.forwardRef((e,t)=>{const{altText:n,...i}=e;return n.trim()?w.jsx(Fv,{altText:n,asChild:!0,children:w.jsx(kd,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Lv}\`. Expected non-empty \`string\`.`),null)});Dv.displayName=Lv;var jv="ToastClose",kd=N.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e,o=uk(jv,n);return w.jsx(Fv,{asChild:!0,children:w.jsx(Xn.button,{type:"button",...i,ref:t,onClick:cn(e.onClick,o.onClose)})})});kd.displayName=jv;var Fv=N.forwardRef((e,t)=>{const{__scopeToast:n,altText:i,...o}=e;return w.jsx(Xn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...o,ref:t})});function Mv(e){const t=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&t.push(i.textContent),mk(i)){const o=i.ariaHidden||i.hidden||i.style.display==="none",a=i.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const u=i.dataset.radixToastAnnounceAlt;u&&t.push(u)}else t.push(...Mv(i))}}),t}function ya(e,t,n,{discrete:i}){const o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),i?xv(o,a):o.dispatchEvent(a)}var rg=(e,t,n=0)=>{const i=Math.abs(e.x),o=Math.abs(e.y),a=i>o;return t==="left"||t==="right"?a&&i>n:!a&&o>n};function pk(e=()=>{}){const t=Ti(e);jo(()=>{let n=0,i=0;return n=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(i)}},[t])}function mk(e){return e.nodeType===e.ELEMENT_NODE}function gk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Jc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var yk=Av,zv=Rv,Uv=Nv,Bv=Ov,$v=Iv,Vv=Dv,Hv=kd;function qv(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,sg=Wv,vk=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return sg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,u=Object.keys(o).map(p=>{const m=n==null?void 0:n[p],y=a==null?void 0:a[p];if(m===null)return null;const x=ig(m)||ig(y);return o[p][x]}),f=n&&Object.entries(n).reduce((p,m)=>{let[y,x]=m;return x===void 0||(p[y]=x),p},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((p,m)=>{let{class:y,className:x,...v}=m;return Object.entries(v).every(R=>{let[_,E]=R;return Array.isArray(E)?E.includes({...a,...f}[_]):{...a,...f}[_]===E})?[...p,y,x]:p},[]);return sg(e,u,h,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Qv=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var wk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bk=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:a,iconNode:u,...f},h)=>N.createElement("svg",{ref:h,...wk,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:Qv("lucide",o),...f},[...u.map(([p,m])=>N.createElement(p,m)),...Array.isArray(a)?a:[a]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zt=(e,t)=>{const n=N.forwardRef(({className:i,...o},a)=>N.createElement(bk,{ref:a,iconNode:t,className:Qv(`lucide-${xk(e)}`,i),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kk=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Kv=zt("ArrowLeft",kk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],us=zt("ArrowRight",Sk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ek=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_k=zt("ChevronDown",Ek);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ck=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ak=zt("ChevronRight",Ck);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tk=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Rk=zt("Download",Tk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pk=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Yv=zt("FileText",Pk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nk=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Ok=zt("Filter",Nk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ik=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Lk=zt("Link2",Ik);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dk=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],og=zt("Linkedin",Dk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jk=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],lg=zt("Mail",jk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fk=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Mk=zt("Menu",Fk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zk=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],Uk=zt("Printer",zk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bk=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Sd=zt("Search",Bk);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $k=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],ag=zt("Twitter",$k);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Fo=zt("X",Vk),Hk=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i({classGroupId:e,validator:t}),Gv=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ua="-",ug=[],Wk="arbitrary..",Qk=e=>{const t=Yk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return Kk(u);const f=u.split(Ua),h=f[0]===""&&f.length>1?1:0;return Xv(f,h,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const h=i[u],p=n[u];return h?p?Hk(p,h):h:p||ug}return n[u]||ug}}},Xv=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const p=Xv(e,t+1,a);if(p)return p}const u=n.validators;if(u===null)return;const f=t===0?e.join(Ua):e.slice(t).join(Ua),h=u.length;for(let p=0;pe.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?Wk+i:void 0})(),Yk=e=>{const{theme:t,classGroups:n}=e;return Gk(n,t)},Gk=(e,t)=>{const n=Gv();for(const i in e){const o=e[i];Ed(o,n,i,t)}return n},Ed=(e,t,n,i)=>{const o=e.length;for(let a=0;a{if(typeof e=="string"){Jk(e,t,n);return}if(typeof e=="function"){Zk(e,t,n,i);return}eS(e,t,n,i)},Jk=(e,t,n)=>{const i=e===""?t:Jv(t,e);i.classGroupId=n},Zk=(e,t,n,i)=>{if(tS(e)){Ed(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(qk(n,e))},eS=(e,t,n,i)=>{const o=Object.entries(e),a=o.length;for(let u=0;u{let n=e;const i=t.split(Ua),o=i.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,nS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const o=(a,u)=>{n[a]=u,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(a){let u=n[a];if(u!==void 0)return u;if((u=i[a])!==void 0)return o(a,u),u},set(a,u){a in n?n[a]=u:o(a,u)}}},Pf="!",cg=":",rS=[],fg=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),iS=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=o=>{const a=[];let u=0,f=0,h=0,p;const m=o.length;for(let _=0;_h?p-h:void 0;return fg(a,v,x,R)};if(t){const o=t+cg,a=i;i=u=>u.startsWith(o)?a(u.slice(o.length)):fg(rS,!1,u,void 0,!0)}if(n){const o=i;i=a=>n({className:a,parseClassName:o})}return i},sS=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let a=0;a0&&(o.sort(),i.push(...o),o=[]),i.push(u)):o.push(u)}return o.length>0&&(o.sort(),i.push(...o)),i}},oS=e=>({cache:nS(e.cacheSize),parseClassName:iS(e),sortModifiers:sS(e),...Qk(e)}),lS=/\s+/,aS=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:a}=t,u=[],f=e.trim().split(lS);let h="";for(let p=f.length-1;p>=0;p-=1){const m=f[p],{isExternal:y,modifiers:x,hasImportantModifier:v,baseClassName:R,maybePostfixModifierPosition:_}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let E=!!_,k=i(E?R.substring(0,_):R);if(!k){if(!E){h=m+(h.length>0?" "+h:h);continue}if(k=i(R),!k){h=m+(h.length>0?" "+h:h);continue}E=!1}const P=x.length===0?"":x.length===1?x[0]:a(x).join(":"),C=v?P+Pf:P,D=C+k;if(u.indexOf(D)>-1)continue;u.push(D);const V=o(k,E);for(let O=0;O0?" "+h:h)}return h},uS=(...e)=>{let t=0,n,i,o="";for(;t{if(typeof e=="string")return e;let t,n="";for(let i=0;i{let n,i,o,a;const u=h=>{const p=t.reduce((m,y)=>y(m),e());return n=oS(p),i=n.cache.get,o=n.cache.set,a=f,f(h)},f=h=>{const p=i(h);if(p)return p;const m=aS(h,n);return o(h,m),m};return a=u,(...h)=>a(uS(...h))},fS=[],pt=e=>{const t=n=>n[e]||fS;return t.isThemeGetter=!0,t},ex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,dS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Or=e=>dS.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),Ir=e=>!!e&&Number.isInteger(Number(e)),Zc=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),lr=e=>hS.test(e),nx=()=>!0,vS=e=>pS.test(e)&&!mS.test(e),_d=()=>!1,xS=e=>gS.test(e),wS=e=>yS.test(e),bS=e=>!me(e)&&!ge(e),kS=e=>Kr(e,sx,_d),me=e=>ex.test(e),ci=e=>Kr(e,ox,vS),dg=e=>Kr(e,PS,Ie),SS=e=>Kr(e,ax,nx),ES=e=>Kr(e,lx,_d),hg=e=>Kr(e,rx,_d),_S=e=>Kr(e,ix,wS),va=e=>Kr(e,ux,xS),ge=e=>tx.test(e),yo=e=>Oi(e,ox),CS=e=>Oi(e,lx),pg=e=>Oi(e,rx),AS=e=>Oi(e,sx),TS=e=>Oi(e,ix),xa=e=>Oi(e,ux,!0),RS=e=>Oi(e,ax,!0),Kr=(e,t,n)=>{const i=ex.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Oi=(e,t,n=!1)=>{const i=tx.exec(e);return i?i[1]?t(i[1]):n:!1},rx=e=>e==="position"||e==="percentage",ix=e=>e==="image"||e==="url",sx=e=>e==="length"||e==="size"||e==="bg-size",ox=e=>e==="length",PS=e=>e==="number",lx=e=>e==="family-name",ax=e=>e==="number"||e==="weight",ux=e=>e==="shadow",NS=()=>{const e=pt("color"),t=pt("font"),n=pt("text"),i=pt("font-weight"),o=pt("tracking"),a=pt("leading"),u=pt("breakpoint"),f=pt("container"),h=pt("spacing"),p=pt("radius"),m=pt("shadow"),y=pt("inset-shadow"),x=pt("text-shadow"),v=pt("drop-shadow"),R=pt("blur"),_=pt("perspective"),E=pt("aspect"),k=pt("ease"),P=pt("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...D(),ge,me],O=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto","contain","none"],z=()=>[ge,me,h],K=()=>[Or,"full","auto",...z()],G=()=>[Ir,"none","subgrid",ge,me],Z=()=>["auto",{span:["full",Ir,ge,me]},Ir,ge,me],re=()=>[Ir,"auto",ge,me],ue=()=>["auto","min","max","fr",ge,me],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],ce=()=>["auto",...z()],xe=()=>[Or,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],ee=()=>[Or,"screen","full","dvw","lvw","svw","min","max","fit",...z()],ae=()=>[Or,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],S=()=>[e,ge,me],L=()=>[...D(),pg,hg,{position:[ge,me]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",AS,kS,{size:[ge,me]}],ye=()=>[Zc,yo,ci],be=()=>["","none","full",p,ge,me],ne=()=>["",Ie,yo,ci],Ce=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ke=()=>[Ie,Zc,pg,hg],Ge=()=>["","none",R,ge,me],xt=()=>["none",Ie,ge,me],ft=()=>["none",Ie,ge,me],tn=()=>[Ie,ge,me],Ut=()=>[Or,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lr],breakpoint:[lr],color:[nx],container:[lr],"drop-shadow":[lr],ease:["in","out","in-out"],font:[bS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lr],shadow:[lr],spacing:["px",Ie],text:[lr],"text-shadow":[lr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Or,me,ge,E]}],container:["container"],columns:[{columns:[Ie,me,ge,f]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Ir,"auto",ge,me]}],basis:[{basis:[Or,"full","auto",f,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,Or,"auto","initial","none",me]}],grow:[{grow:["",Ie,ge,me]}],shrink:[{shrink:["",Ie,ge,me]}],order:[{order:[Ir,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:ce()}],mx:[{mx:ce()}],my:[{my:ce()}],ms:[{ms:ce()}],me:[{me:ce()}],mbs:[{mbs:ce()}],mbe:[{mbe:ce()}],mt:[{mt:ce()}],mr:[{mr:ce()}],mb:[{mb:ce()}],ml:[{ml:ce()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:xe()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[f,"screen",...xe()]}],"min-w":[{"min-w":[f,"screen","none",...xe()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...xe()]}],h:[{h:["screen","lh",...xe()]}],"min-h":[{"min-h":["screen","lh","none",...xe()]}],"max-h":[{"max-h":["screen","lh",...xe()]}],"font-size":[{text:["base",n,yo,ci]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,RS,SS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zc,me]}],"font-family":[{font:[CS,ES,t]}],"font-features":[{"font-features":[me]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ge,me]}],"line-clamp":[{"line-clamp":[Ie,"none",ge,dg]}],leading:[{leading:[a,...z()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",ge,ci]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[Ie,"auto",ge,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ir,ge,me],radial:["",ge,me],conic:[Ir,ge,me]},TS,_S]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:ye()}],"gradient-via-pos":[{via:ye()}],"gradient-to-pos":[{to:ye()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-bs":[{"border-bs":S()}],"border-color-be":[{"border-be":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,ge,me]}],"outline-w":[{outline:["",Ie,yo,ci]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",m,xa,va]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",y,xa,va]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[Ie,ci]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",x,xa,va]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[Ie,ge,me]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":ke()}],"mask-image-linear-to-pos":[{"mask-linear-to":ke()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":ke()}],"mask-image-t-to-pos":[{"mask-t-to":ke()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":ke()}],"mask-image-r-to-pos":[{"mask-r-to":ke()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":ke()}],"mask-image-b-to-pos":[{"mask-b-to":ke()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":ke()}],"mask-image-l-to-pos":[{"mask-l-to":ke()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":ke()}],"mask-image-x-to-pos":[{"mask-x-to":ke()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":ke()}],"mask-image-y-to-pos":[{"mask-y-to":ke()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":ke()}],"mask-image-radial-to-pos":[{"mask-radial-to":ke()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":ke()}],"mask-image-conic-to-pos":[{"mask-conic-to":ke()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:Ge()}],brightness:[{brightness:[Ie,ge,me]}],contrast:[{contrast:[Ie,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",v,xa,va]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",Ie,ge,me]}],"hue-rotate":[{"hue-rotate":[Ie,ge,me]}],invert:[{invert:["",Ie,ge,me]}],saturate:[{saturate:[Ie,ge,me]}],sepia:[{sepia:["",Ie,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":Ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",Ie,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,ge,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",ge,me]}],ease:[{ease:["linear","initial",k,ge,me]}],delay:[{delay:[Ie,ge,me]}],animate:[{animate:["none",P,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,ge,me]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:xt()}],"rotate-x":[{"rotate-x":xt()}],"rotate-y":[{"rotate-y":xt()}],"rotate-z":[{"rotate-z":xt()}],scale:[{scale:ft()}],"scale-x":[{"scale-x":ft()}],"scale-y":[{"scale-y":ft()}],"scale-z":[{"scale-z":ft()}],"scale-3d":["scale-3d"],skew:[{skew:tn()}],"skew-x":[{"skew-x":tn()}],"skew-y":[{"skew-y":tn()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,me]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[Ie,yo,ci,dg]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},OS=cS(NS);function As(...e){return OS(Wv(e))}const IS=yk,cx=N.forwardRef(({className:e,...t},n)=>w.jsx(zv,{ref:n,className:As("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));cx.displayName=zv.displayName;const LS=vk("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),fx=N.forwardRef(({className:e,variant:t,...n},i)=>w.jsx(Uv,{ref:i,className:As(LS({variant:t}),e),...n}));fx.displayName=Uv.displayName;const DS=N.forwardRef(({className:e,...t},n)=>w.jsx(Vv,{ref:n,className:As("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));DS.displayName=Vv.displayName;const dx=N.forwardRef(({className:e,...t},n)=>w.jsx(Hv,{ref:n,className:As("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:w.jsx(Fo,{className:"h-4 w-4"})}));dx.displayName=Hv.displayName;const hx=N.forwardRef(({className:e,...t},n)=>w.jsx(Bv,{ref:n,className:As("text-sm font-semibold",e),...t}));hx.displayName=Bv.displayName;const px=N.forwardRef(({className:e,...t},n)=>w.jsx($v,{ref:n,className:As("text-sm opacity-90",e),...t}));px.displayName=$v.displayName;function jS(){const{toasts:e}=xb();return w.jsxs(IS,{children:[e.map(function({id:t,title:n,description:i,action:o,...a}){return w.jsxs(fx,{...a,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(hx,{children:n}),i&&w.jsx(px,{children:i})]}),o,w.jsx(dx,{})]},t)}),w.jsx(cx,{})]})}var Yo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},FS={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Fr,md,sv,MS=(sv=class{constructor(){_e(this,Fr,FS);_e(this,md,!1)}setTimeoutProvider(e){de(this,Fr,e)}setTimeout(e,t){return j(this,Fr).setTimeout(e,t)}clearTimeout(e){j(this,Fr).clearTimeout(e)}setInterval(e,t){return j(this,Fr).setInterval(e,t)}clearInterval(e){j(this,Fr).clearInterval(e)}},Fr=new WeakMap,md=new WeakMap,sv),hi=new MS;function zS(e){setTimeout(e,0)}var Ri=typeof window>"u"||"Deno"in globalThis;function Gt(){}function US(e,t){return typeof e=="function"?e(t):e}function Nf(e){return typeof e=="number"&&e>=0&&e!==1/0}function mx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Wr(e,t){return typeof e=="function"?e(t):e}function wn(e,t){return typeof e=="function"?e(t):e}function mg(e,t){const{type:n="all",exact:i,fetchStatus:o,predicate:a,queryKey:u,stale:f}=e;if(u){if(i){if(t.queryHash!==Cd(u,t.options))return!1}else if(!zo(t.queryKey,u))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||o&&o!==t.state.fetchStatus||a&&!a(t))}function gg(e,t){const{exact:n,status:i,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Mo(t.options.mutationKey)!==Mo(a))return!1}else if(!zo(t.options.mutationKey,a))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function Cd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Mo)(e)}function Mo(e){return JSON.stringify(e,(t,n)=>If(n)?Object.keys(n).sort().reduce((i,o)=>(i[o]=n[o],i),{}):n)}function zo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>zo(e[n],t[n])):!1}var BS=Object.prototype.hasOwnProperty;function gx(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=yg(e)&&yg(t);if(!i&&!(If(e)&&If(t)))return t;const a=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),f=u.length,h=i?new Array(f):{};let p=0;for(let m=0;m{hi.setTimeout(t,e)})}function Lf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?gx(e,t):t}function VS(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function HS(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Ad=Symbol();function yx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ad?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vx(e,t){return typeof e=="function"?e(...t):!!e}function qS(e,t,n){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),i||(i=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var gi,Mr,hs,ov,WS=(ov=class extends Yo{constructor(){super();_e(this,gi);_e(this,Mr);_e(this,hs);de(this,hs,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,Mr)||this.setEventListener(j(this,hs))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Mr))==null||t.call(this),de(this,Mr,void 0))}setEventListener(t){var n;de(this,hs,t),(n=j(this,Mr))==null||n.call(this),de(this,Mr,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){j(this,gi)!==t&&(de(this,gi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,gi)=="boolean"?j(this,gi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},gi=new WeakMap,Mr=new WeakMap,hs=new WeakMap,ov),Td=new WS;function Df(){let e,t;const n=new Promise((o,a)=>{e=o,t=a});n.status="pending",n.catch(()=>{});function i(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},n.reject=o=>{i({status:"rejected",reason:o}),t(o)},n}var QS=zS;function KS(){let e=[],t=0,n=f=>{f()},i=f=>{f()},o=QS;const a=f=>{t?e.push(f):o(()=>{n(f)})},u=()=>{const f=e;e=[],f.length&&o(()=>{i(()=>{f.forEach(h=>{n(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||u()}return h},batchCalls:f=>(...h)=>{a(()=>{f(...h)})},schedule:a,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{o=f}}}var _t=KS(),ps,zr,ms,lv,YS=(lv=class extends Yo{constructor(){super();_e(this,ps,!0);_e(this,zr);_e(this,ms);de(this,ms,t=>{if(!Ri&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){j(this,zr)||this.setEventListener(j(this,ms))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,zr))==null||t.call(this),de(this,zr,void 0))}setEventListener(t){var n;de(this,ms,t),(n=j(this,zr))==null||n.call(this),de(this,zr,t(this.setOnline.bind(this)))}setOnline(t){j(this,ps)!==t&&(de(this,ps,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return j(this,ps)}},ps=new WeakMap,zr=new WeakMap,ms=new WeakMap,lv),Ba=new YS;function GS(e){return Math.min(1e3*2**e,3e4)}function xx(e){return(e??"online")==="online"?Ba.isOnline():!0}var jf=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wx(e){let t=!1,n=0,i;const o=Df(),a=()=>o.status!=="pending",u=_=>{var E;if(!a()){const k=new jf(_);x(k),(E=e.onCancel)==null||E.call(e,k)}},f=()=>{t=!0},h=()=>{t=!1},p=()=>Td.isFocused()&&(e.networkMode==="always"||Ba.isOnline())&&e.canRun(),m=()=>xx(e.networkMode)&&e.canRun(),y=_=>{a()||(i==null||i(),o.resolve(_))},x=_=>{a()||(i==null||i(),o.reject(_))},v=()=>new Promise(_=>{var E;i=k=>{(a()||p())&&_(k)},(E=e.onPause)==null||E.call(e)}).then(()=>{var _;i=void 0,a()||(_=e.onContinue)==null||_.call(e)}),R=()=>{if(a())return;let _;const E=n===0?e.initialPromise:void 0;try{_=E??e.fn()}catch(k){_=Promise.reject(k)}Promise.resolve(_).then(y).catch(k=>{var O;if(a())return;const P=e.retry??(Ri?0:3),C=e.retryDelay??GS,D=typeof C=="function"?C(n,k):C,V=P===!0||typeof P=="number"&&np()?void 0:v()).then(()=>{t?x(k):R()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(i==null||i(),o),cancelRetry:f,continueRetry:h,canStart:m,start:()=>(m()?R():v().then(R),o)}}var yi,av,bx=(av=class{constructor(){_e(this,yi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Nf(this.gcTime)&&de(this,yi,hi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:300*1e3))}clearGcTimeout(){j(this,yi)&&(hi.clearTimeout(j(this,yi)),de(this,yi,void 0))}},yi=new WeakMap,av),vi,gs,xn,xi,vt,$o,wi,On,ar,uv,XS=(uv=class extends bx{constructor(t){super();_e(this,On);_e(this,vi);_e(this,gs);_e(this,xn);_e(this,xi);_e(this,vt);_e(this,$o);_e(this,wi);de(this,wi,!1),de(this,$o,t.defaultOptions),this.setOptions(t.options),this.observers=[],de(this,xi,t.client),de(this,xn,j(this,xi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,de(this,vi,wg(this.options)),this.state=t.state??j(this,vi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,vt))==null?void 0:t.promise}setOptions(t){if(this.options={...j(this,$o),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=wg(this.options);n.data!==void 0&&(this.setState(xg(n.data,n.dataUpdatedAt)),de(this,vi,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,xn).remove(this)}setData(t,n){const i=Lf(this.state.data,t,this.options);return je(this,On,ar).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){je(this,On,ar).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,o;const n=(i=j(this,vt))==null?void 0:i.promise;return(o=j(this,vt))==null||o.cancel(t),n?n.then(Gt).catch(Gt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,vi))}isActive(){return this.observers.some(t=>wn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ad||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Wr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!mx(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,vt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,vt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,xn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(j(this,vt)&&(j(this,wi)?j(this,vt).cancel({revert:!0}):j(this,vt).cancelRetry()),this.scheduleGc()),j(this,xn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||je(this,On,ar).call(this,{type:"invalidate"})}async fetch(t,n){var h,p,m,y,x,v,R,_,E,k,P,C;if(this.state.fetchStatus!=="idle"&&((h=j(this,vt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,vt))return j(this,vt).continueRetry(),j(this,vt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(V=>V.options.queryFn);D&&this.setOptions(D.options)}const i=new AbortController,o=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(de(this,wi,!0),i.signal)})},a=()=>{const D=yx(this.options,n),O=(()=>{const Q={client:j(this,xi),queryKey:this.queryKey,meta:this.meta};return o(Q),Q})();return de(this,wi,!1),this.options.persister?this.options.persister(D,O,this):D(O)},f=(()=>{const D={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:j(this,xi),state:this.state,fetchFn:a};return o(D),D})();(p=this.options.behavior)==null||p.onFetch(f,this),de(this,gs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=f.fetchOptions)==null?void 0:m.meta))&&je(this,On,ar).call(this,{type:"fetch",meta:(y=f.fetchOptions)==null?void 0:y.meta}),de(this,vt,wx({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:D=>{D instanceof jf&&D.revert&&this.setState({...j(this,gs),fetchStatus:"idle"}),i.abort()},onFail:(D,V)=>{je(this,On,ar).call(this,{type:"failed",failureCount:D,error:V})},onPause:()=>{je(this,On,ar).call(this,{type:"pause"})},onContinue:()=>{je(this,On,ar).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const D=await j(this,vt).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(v=(x=j(this,xn).config).onSuccess)==null||v.call(x,D,this),(_=(R=j(this,xn).config).onSettled)==null||_.call(R,D,this.state.error,this),D}catch(D){if(D instanceof jf){if(D.silent)return j(this,vt).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw je(this,On,ar).call(this,{type:"error",error:D}),(k=(E=j(this,xn).config).onError)==null||k.call(E,D,this),(C=(P=j(this,xn).config).onSettled)==null||C.call(P,this.state.data,D,this),D}finally{this.scheduleGc()}}},vi=new WeakMap,gs=new WeakMap,xn=new WeakMap,xi=new WeakMap,vt=new WeakMap,$o=new WeakMap,wi=new WeakMap,On=new WeakSet,ar=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...kx(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...xg(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return de(this,gs,t.manual?o:void 0),o;case"error":const a=t.error;return{...i,error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),_t.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),j(this,xn).notify({query:this,type:"updated",action:t})})},uv);function kx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xx(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xg(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function wg(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Yt,Fe,Vo,Mt,bi,ys,ur,Ur,Ho,vs,xs,ki,Si,Br,ws,He,Co,Ff,Mf,zf,Uf,Bf,$f,Vf,Sx,cv,JS=(cv=class extends Yo{constructor(t,n){super();_e(this,He);_e(this,Yt);_e(this,Fe);_e(this,Vo);_e(this,Mt);_e(this,bi);_e(this,ys);_e(this,ur);_e(this,Ur);_e(this,Ho);_e(this,vs);_e(this,xs);_e(this,ki);_e(this,Si);_e(this,Br);_e(this,ws,new Set);this.options=n,de(this,Yt,t),de(this,Ur,null),de(this,ur,Df()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,Fe).addObserver(this),bg(j(this,Fe),this.options)?je(this,He,Co).call(this):this.updateResult(),je(this,He,Uf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Hf(j(this,Fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Hf(j(this,Fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,je(this,He,Bf).call(this),je(this,He,$f).call(this),j(this,Fe).removeObserver(this)}setOptions(t){const n=this.options,i=j(this,Fe);if(this.options=j(this,Yt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wn(this.options.enabled,j(this,Fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");je(this,He,Vf).call(this),j(this,Fe).setOptions(this.options),n._defaulted&&!Of(this.options,n)&&j(this,Yt).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,Fe),observer:this});const o=this.hasListeners();o&&kg(j(this,Fe),i,this.options,n)&&je(this,He,Co).call(this),this.updateResult(),o&&(j(this,Fe)!==i||wn(this.options.enabled,j(this,Fe))!==wn(n.enabled,j(this,Fe))||Wr(this.options.staleTime,j(this,Fe))!==Wr(n.staleTime,j(this,Fe)))&&je(this,He,Ff).call(this);const a=je(this,He,Mf).call(this);o&&(j(this,Fe)!==i||wn(this.options.enabled,j(this,Fe))!==wn(n.enabled,j(this,Fe))||a!==j(this,Br))&&je(this,He,zf).call(this,a)}getOptimisticResult(t){const n=j(this,Yt).getQueryCache().build(j(this,Yt),t),i=this.createResult(n,t);return eE(this,i)&&(de(this,Mt,i),de(this,ys,this.options),de(this,bi,j(this,Fe).state)),i}getCurrentResult(){return j(this,Mt)}trackResult(t,n){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&j(this,ur).status==="pending"&&j(this,ur).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,o))})}trackProp(t){j(this,ws).add(t)}getCurrentQuery(){return j(this,Fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=j(this,Yt).defaultQueryOptions(t),i=j(this,Yt).getQueryCache().build(j(this,Yt),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(t){return je(this,He,Co).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,Mt)))}createResult(t,n){var K;const i=j(this,Fe),o=this.options,a=j(this,Mt),u=j(this,bi),f=j(this,ys),p=t!==i?t.state:j(this,Vo),{state:m}=t;let y={...m},x=!1,v;if(n._optimisticResults){const G=this.hasListeners(),Z=!G&&bg(t,n),re=G&&kg(t,i,n,o);(Z||re)&&(y={...y,...kx(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:R,errorUpdatedAt:_,status:E}=y;v=y.data;let k=!1;if(n.placeholderData!==void 0&&v===void 0&&E==="pending"){let G;a!=null&&a.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(G=a.data,k=!0):G=typeof n.placeholderData=="function"?n.placeholderData((K=j(this,xs))==null?void 0:K.state.data,j(this,xs)):n.placeholderData,G!==void 0&&(E="success",v=Lf(a==null?void 0:a.data,G,n),x=!0)}if(n.select&&v!==void 0&&!k)if(a&&v===(u==null?void 0:u.data)&&n.select===j(this,Ho))v=j(this,vs);else try{de(this,Ho,n.select),v=n.select(v),v=Lf(a==null?void 0:a.data,v,n),de(this,vs,v),de(this,Ur,null)}catch(G){de(this,Ur,G)}j(this,Ur)&&(R=j(this,Ur),v=j(this,vs),_=Date.now(),E="error");const P=y.fetchStatus==="fetching",C=E==="pending",D=E==="error",V=C&&P,O=v!==void 0,z={status:E,fetchStatus:y.fetchStatus,isPending:C,isSuccess:E==="success",isError:D,isInitialLoading:V,isLoading:V,data:v,dataUpdatedAt:y.dataUpdatedAt,error:R,errorUpdatedAt:_,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:P,isRefetching:P&&!C,isLoadingError:D&&!O,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&O,isStale:Rd(t,n),refetch:this.refetch,promise:j(this,ur),isEnabled:wn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=z.data!==void 0,Z=z.status==="error"&&!G,re=Y=>{Z?Y.reject(z.error):G&&Y.resolve(z.data)},ue=()=>{const Y=de(this,ur,z.promise=Df());re(Y)},W=j(this,ur);switch(W.status){case"pending":t.queryHash===i.queryHash&&re(W);break;case"fulfilled":(Z||z.data!==W.value)&&ue();break;case"rejected":(!Z||z.error!==W.reason)&&ue();break}}return z}updateResult(){const t=j(this,Mt),n=this.createResult(j(this,Fe),this.options);if(de(this,bi,j(this,Fe).state),de(this,ys,this.options),j(this,bi).data!==void 0&&de(this,xs,j(this,Fe)),Of(n,t))return;de(this,Mt,n);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!j(this,ws).size)return!0;const u=new Set(a??j(this,ws));return this.options.throwOnError&&u.add("error"),Object.keys(j(this,Mt)).some(f=>{const h=f;return j(this,Mt)[h]!==t[h]&&u.has(h)})};je(this,He,Sx).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&je(this,He,Uf).call(this)}},Yt=new WeakMap,Fe=new WeakMap,Vo=new WeakMap,Mt=new WeakMap,bi=new WeakMap,ys=new WeakMap,ur=new WeakMap,Ur=new WeakMap,Ho=new WeakMap,vs=new WeakMap,xs=new WeakMap,ki=new WeakMap,Si=new WeakMap,Br=new WeakMap,ws=new WeakMap,He=new WeakSet,Co=function(t){je(this,He,Vf).call(this);let n=j(this,Fe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Gt)),n},Ff=function(){je(this,He,Bf).call(this);const t=Wr(this.options.staleTime,j(this,Fe));if(Ri||j(this,Mt).isStale||!Nf(t))return;const i=mx(j(this,Mt).dataUpdatedAt,t)+1;de(this,ki,hi.setTimeout(()=>{j(this,Mt).isStale||this.updateResult()},i))},Mf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,Fe)):this.options.refetchInterval)??!1},zf=function(t){je(this,He,$f).call(this),de(this,Br,t),!(Ri||wn(this.options.enabled,j(this,Fe))===!1||!Nf(j(this,Br))||j(this,Br)===0)&&de(this,Si,hi.setInterval(()=>{(this.options.refetchIntervalInBackground||Td.isFocused())&&je(this,He,Co).call(this)},j(this,Br)))},Uf=function(){je(this,He,Ff).call(this),je(this,He,zf).call(this,je(this,He,Mf).call(this))},Bf=function(){j(this,ki)&&(hi.clearTimeout(j(this,ki)),de(this,ki,void 0))},$f=function(){j(this,Si)&&(hi.clearInterval(j(this,Si)),de(this,Si,void 0))},Vf=function(){const t=j(this,Yt).getQueryCache().build(j(this,Yt),this.options);if(t===j(this,Fe))return;const n=j(this,Fe);de(this,Fe,t),de(this,Vo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Sx=function(t){_t.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(j(this,Mt))}),j(this,Yt).getQueryCache().notify({query:j(this,Fe),type:"observerResultsUpdated"})})},cv);function ZS(e,t){return wn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function bg(e,t){return ZS(e,t)||e.state.data!==void 0&&Hf(e,t,t.refetchOnMount)}function Hf(e,t,n){if(wn(t.enabled,e)!==!1&&Wr(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Rd(e,t)}return!1}function kg(e,t,n,i){return(e!==t||wn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Rd(e,n)}function Rd(e,t){return wn(t.enabled,e)!==!1&&e.isStaleByTime(Wr(t.staleTime,e))}function eE(e,t){return!Of(e.getCurrentResult(),t)}function Sg(e){return{onFetch:(t,n)=>{var m,y,x,v,R;const i=t.options,o=(x=(y=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:y.fetchMore)==null?void 0:x.direction,a=((v=t.state.data)==null?void 0:v.pages)||[],u=((R=t.state.data)==null?void 0:R.pageParams)||[];let f={pages:[],pageParams:[]},h=0;const p=async()=>{let _=!1;const E=C=>{qS(C,()=>t.signal,()=>_=!0)},k=yx(t.options,t.fetchOptions),P=async(C,D,V)=>{if(_)return Promise.reject();if(D==null&&C.pages.length)return Promise.resolve(C);const Q=(()=>{const Z={client:t.client,queryKey:t.queryKey,pageParam:D,direction:V?"backward":"forward",meta:t.options.meta};return E(Z),Z})(),z=await k(Q),{maxPages:K}=t.options,G=V?HS:VS;return{pages:G(C.pages,z,K),pageParams:G(C.pageParams,D,K)}};if(o&&a.length){const C=o==="backward",D=C?tE:Eg,V={pages:a,pageParams:u},O=D(i,V);f=await P(V,O,C)}else{const C=e??a.length;do{const D=h===0?u[0]??i.initialPageParam:Eg(i,f);if(h>0&&D==null)break;f=await P(f,D),h++}while(h{var _,E;return(E=(_=t.options).persister)==null?void 0:E.call(_,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=p}}}function Eg(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function tE(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}var qo,Hn,Ot,Ei,qn,jr,fv,nE=(fv=class extends bx{constructor(t){super();_e(this,qn);_e(this,qo);_e(this,Hn);_e(this,Ot);_e(this,Ei);de(this,qo,t.client),this.mutationId=t.mutationId,de(this,Ot,t.mutationCache),de(this,Hn,[]),this.state=t.state||rE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,Hn).includes(t)||(j(this,Hn).push(t),this.clearGcTimeout(),j(this,Ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){de(this,Hn,j(this,Hn).filter(n=>n!==t)),this.scheduleGc(),j(this,Ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,Hn).length||(this.state.status==="pending"?this.scheduleGc():j(this,Ot).remove(this))}continue(){var t;return((t=j(this,Ei))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,f,h,p,m,y,x,v,R,_,E,k,P,C,D,V,O,Q;const n=()=>{je(this,qn,jr).call(this,{type:"continue"})},i={client:j(this,qo),meta:this.options.meta,mutationKey:this.options.mutationKey};de(this,Ei,wx({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(z,K)=>{je(this,qn,jr).call(this,{type:"failed",failureCount:z,error:K})},onPause:()=>{je(this,qn,jr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,Ot).canRun(this)}));const o=this.state.status==="pending",a=!j(this,Ei).canStart();try{if(o)n();else{je(this,qn,jr).call(this,{type:"pending",variables:t,isPaused:a}),j(this,Ot).config.onMutate&&await j(this,Ot).config.onMutate(t,this,i);const K=await((f=(u=this.options).onMutate)==null?void 0:f.call(u,t,i));K!==this.state.context&&je(this,qn,jr).call(this,{type:"pending",context:K,variables:t,isPaused:a})}const z=await j(this,Ei).start();return await((p=(h=j(this,Ot).config).onSuccess)==null?void 0:p.call(h,z,t,this.state.context,this,i)),await((y=(m=this.options).onSuccess)==null?void 0:y.call(m,z,t,this.state.context,i)),await((v=(x=j(this,Ot).config).onSettled)==null?void 0:v.call(x,z,null,this.state.variables,this.state.context,this,i)),await((_=(R=this.options).onSettled)==null?void 0:_.call(R,z,null,t,this.state.context,i)),je(this,qn,jr).call(this,{type:"success",data:z}),z}catch(z){try{await((k=(E=j(this,Ot).config).onError)==null?void 0:k.call(E,z,t,this.state.context,this,i))}catch(K){Promise.reject(K)}try{await((C=(P=this.options).onError)==null?void 0:C.call(P,z,t,this.state.context,i))}catch(K){Promise.reject(K)}try{await((V=(D=j(this,Ot).config).onSettled)==null?void 0:V.call(D,void 0,z,this.state.variables,this.state.context,this,i))}catch(K){Promise.reject(K)}try{await((Q=(O=this.options).onSettled)==null?void 0:Q.call(O,void 0,z,t,this.state.context,i))}catch(K){Promise.reject(K)}throw je(this,qn,jr).call(this,{type:"error",error:z}),z}finally{j(this,Ot).runNext(this)}}},qo=new WeakMap,Hn=new WeakMap,Ot=new WeakMap,Ei=new WeakMap,qn=new WeakSet,jr=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),_t.batch(()=>{j(this,Hn).forEach(i=>{i.onMutationUpdate(t)}),j(this,Ot).notify({mutation:this,type:"updated",action:t})})},fv);function rE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cr,In,Wo,dv,iE=(dv=class extends Yo{constructor(t={}){super();_e(this,cr);_e(this,In);_e(this,Wo);this.config=t,de(this,cr,new Set),de(this,In,new Map),de(this,Wo,0)}build(t,n,i){const o=new nE({client:t,mutationCache:this,mutationId:++pa(this,Wo)._,options:t.defaultMutationOptions(n),state:i});return this.add(o),o}add(t){j(this,cr).add(t);const n=wa(t);if(typeof n=="string"){const i=j(this,In).get(n);i?i.push(t):j(this,In).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(j(this,cr).delete(t)){const n=wa(t);if(typeof n=="string"){const i=j(this,In).get(n);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&j(this,In).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=wa(t);if(typeof n=="string"){const i=j(this,In).get(n),o=i==null?void 0:i.find(a=>a.state.status==="pending");return!o||o===t}else return!0}runNext(t){var i;const n=wa(t);if(typeof n=="string"){const o=(i=j(this,In).get(n))==null?void 0:i.find(a=>a!==t&&a.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){_t.batch(()=>{j(this,cr).forEach(t=>{this.notify({type:"removed",mutation:t})}),j(this,cr).clear(),j(this,In).clear()})}getAll(){return Array.from(j(this,cr))}find(t){const n={exact:!0,...t};return this.getAll().find(i=>gg(n,i))}findAll(t={}){return this.getAll().filter(n=>gg(t,n))}notify(t){_t.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return _t.batch(()=>Promise.all(t.map(n=>n.continue().catch(Gt))))}},cr=new WeakMap,In=new WeakMap,Wo=new WeakMap,dv);function wa(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Wn,hv,sE=(hv=class extends Yo{constructor(t={}){super();_e(this,Wn);this.config=t,de(this,Wn,new Map)}build(t,n,i){const o=n.queryKey,a=n.queryHash??Cd(o,n);let u=this.get(a);return u||(u=new XS({client:t,queryKey:o,queryHash:a,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(u)),u}add(t){j(this,Wn).has(t.queryHash)||(j(this,Wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=j(this,Wn).get(t.queryHash);n&&(t.destroy(),n===t&&j(this,Wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){_t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,Wn).get(t)}getAll(){return[...j(this,Wn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>mg(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>mg(t,i)):n}notify(t){_t.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){_t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){_t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wn=new WeakMap,hv),rt,$r,Vr,bs,ks,Hr,Ss,Es,pv,oE=(pv=class{constructor(e={}){_e(this,rt);_e(this,$r);_e(this,Vr);_e(this,bs);_e(this,ks);_e(this,Hr);_e(this,Ss);_e(this,Es);de(this,rt,e.queryCache||new sE),de(this,$r,e.mutationCache||new iE),de(this,Vr,e.defaultOptions||{}),de(this,bs,new Map),de(this,ks,new Map),de(this,Hr,0)}mount(){pa(this,Hr)._++,j(this,Hr)===1&&(de(this,Ss,Td.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,rt).onFocus())})),de(this,Es,Ba.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,rt).onOnline())})))}unmount(){var e,t;pa(this,Hr)._--,j(this,Hr)===0&&((e=j(this,Ss))==null||e.call(this),de(this,Ss,void 0),(t=j(this,Es))==null||t.call(this),de(this,Es,void 0))}isFetching(e){return j(this,rt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,$r).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,rt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=j(this,rt).build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Wr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return j(this,rt).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),o=j(this,rt).get(i.queryHash),a=o==null?void 0:o.state.data,u=US(t,a);if(u!==void 0)return j(this,rt).build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return _t.batch(()=>j(this,rt).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,rt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=j(this,rt);_t.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=j(this,rt);return _t.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=_t.batch(()=>j(this,rt).findAll(e).map(o=>o.cancel(n)));return Promise.all(i).then(Gt).catch(Gt)}invalidateQueries(e,t={}){return _t.batch(()=>(j(this,rt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=_t.batch(()=>j(this,rt).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,n);return n.throwOnError||(a=a.catch(Gt)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(Gt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=j(this,rt).build(this,t);return n.isStaleByTime(Wr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Gt).catch(Gt)}fetchInfiniteQuery(e){return e.behavior=Sg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Gt).catch(Gt)}ensureInfiniteQueryData(e){return e.behavior=Sg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ba.isOnline()?j(this,$r).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,rt)}getMutationCache(){return j(this,$r)}getDefaultOptions(){return j(this,Vr)}setDefaultOptions(e){de(this,Vr,e)}setQueryDefaults(e,t){j(this,bs).set(Mo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,bs).values()],n={};return t.forEach(i=>{zo(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){j(this,ks).set(Mo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,ks).values()],n={};return t.forEach(i=>{zo(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,Vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ad&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,Vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,rt).clear(),j(this,$r).clear()}},rt=new WeakMap,$r=new WeakMap,Vr=new WeakMap,bs=new WeakMap,ks=new WeakMap,Hr=new WeakMap,Ss=new WeakMap,Es=new WeakMap,pv),Ex=N.createContext(void 0),lE=e=>{const t=N.useContext(Ex);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},aE=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(Ex.Provider,{value:e,children:t})),_x=N.createContext(!1),uE=()=>N.useContext(_x);_x.Provider;function cE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fE=N.createContext(cE()),dE=()=>N.useContext(fE),hE=(e,t,n)=>{const i=n!=null&&n.state.error&&typeof e.throwOnError=="function"?vx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},pE=e=>{N.useEffect(()=>{e.clearReset()},[e])},mE=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||vx(n,[e.error,i])),gE=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>n(i(...o)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},yE=(e,t)=>e.isLoading&&e.isFetching&&!t,vE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_g=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function xE(e,t,n){var x,v,R,_;const i=uE(),o=dE(),a=lE(),u=a.defaultQueryOptions(e);(v=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||v.call(x,u);const f=a.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",gE(u),hE(u,o,f),pE(o);const h=!a.getQueryCache().get(u.queryHash),[p]=N.useState(()=>new t(a,u)),m=p.getOptimisticResult(u),y=!i&&e.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(E=>{const k=y?p.subscribe(_t.batchCalls(E)):Gt;return p.updateResult(),k},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),N.useEffect(()=>{p.setOptions(u)},[u,p]),vE(u,m))throw _g(u,p,o);if(mE({result:m,errorResetBoundary:o,throwOnError:u.throwOnError,query:f,suspense:u.suspense}))throw m.error;if((_=(R=a.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||_.call(R,u,m),u.experimental_prefetchInRender&&!Ri&&yE(m,i)){const E=h?_g(u,p,o):f==null?void 0:f.promise;E==null||E.catch(Gt).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?m:p.trackResult(m)}function wE(e,t){return xE(e,JS)}const bE=new oE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Cx(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function SE(){return Math.random().toString(36).substr(2,8)}function Ag(e,t){return{usr:e.state,key:e.key,idx:t}}function qf(e,t,n,i){return n===void 0&&(n=null),$a({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ga(t):t,{state:n,key:t&&t.key||i||SE()})}function Ax(e){let{pathname:t="/",search:n="",hash:i=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Ga(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function EE(e,t,n,i){i===void 0&&(i={});let{window:o=document.defaultView,v5Compat:a=!1}=i,u=o.history,f=qr.Pop,h=null,p=m();p==null&&(p=0,u.replaceState($a({},u.state,{idx:p}),""));function m(){return(u.state||{idx:null}).idx}function y(){f=qr.Pop;let E=m(),k=E==null?null:E-p;p=E,h&&h({action:f,location:_.location,delta:k})}function x(E,k){f=qr.Push;let P=qf(_.location,E,k);p=m()+1;let C=Ag(P,p),D=_.createHref(P);try{u.pushState(C,"",D)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;o.location.assign(D)}a&&h&&h({action:f,location:_.location,delta:1})}function v(E,k){f=qr.Replace;let P=qf(_.location,E,k);p=m();let C=Ag(P,p),D=_.createHref(P);u.replaceState(C,"",D),a&&h&&h({action:f,location:_.location,delta:0})}function R(E){let k=o.location.origin!=="null"?o.location.origin:o.location.href,P=typeof E=="string"?E:Ax(E);return P=P.replace(/ $/,"%20"),Zt(k,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,k)}let _={get action(){return f},get location(){return e(o,u)},listen(E){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(Cg,y),h=E,()=>{o.removeEventListener(Cg,y),h=null}},createHref(E){return t(o,E)},createURL:R,encodeLocation(E){let k=R(E);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:x,replace:v,go(E){return u.go(E)}};return _}var Tg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Tg||(Tg={}));function _E(e,t,n){return n===void 0&&(n="/"),CE(e,t,n)}function CE(e,t,n,i){let o=typeof t=="string"?Ga(t):t,a=Px(o.pathname||"/",n);if(a==null)return null;let u=Tx(e);AE(u);let f=null,h=zE(a);for(let p=0;f==null&&p{let h={relativePath:f===void 0?a.path||"":f,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};h.relativePath.startsWith("/")&&(Zt(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let p=cs([i,h.relativePath]),m=n.concat(h);a.children&&a.children.length>0&&(Zt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),Tx(a.children,t,m,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:LE(p,a.index),routesMeta:m})};return e.forEach((a,u)=>{var f;if(a.path===""||!((f=a.path)!=null&&f.includes("?")))o(a,u);else for(let h of Rx(a.path))o(a,u,h)}),t}function Rx(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(i.length===0)return o?[a,""]:[a];let u=Rx(i.join("/")),f=[];return f.push(...u.map(h=>h===""?a:[a,h].join("/"))),o&&f.push(...u),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function AE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:DE(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const TE=/^:[\w-]+$/,RE=3,PE=2,NE=1,OE=10,IE=-2,Rg=e=>e==="*";function LE(e,t){let n=e.split("/"),i=n.length;return n.some(Rg)&&(i+=IE),t&&(i+=PE),n.filter(o=>!Rg(o)).reduce((o,a)=>o+(TE.test(a)?RE:a===""?NE:OE),i)}function DE(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function jE(e,t,n){let{routesMeta:i}=e,o={},a="/",u=[];for(let f=0;f{let{paramName:x,isOptional:v}=m;if(x==="*"){let _=f[y]||"";u=a.slice(0,a.length-_.length).replace(/(.)\/+$/,"$1")}const R=f[y];return v&&!R?p[x]=void 0:p[x]=(R||"").replace(/%2F/g,"/"),p},{}),pathname:a,pathnameBase:u,pattern:e}}function ME(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Cx(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,h)=>(i.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function zE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Cx(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Px(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}const UE=e=>e.replace(/\/\/+/g,"/"),cs=e=>UE(e.join("/")),BE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function $E(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Nx=["post","put","patch","delete"];new Set(Nx);const VE=["get",...Nx];new Set(VE);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},E,{params:Object.assign({},f,E.params),pathname:cs([h,o.encodeLocation?o.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?h:cs([h,o.encodeLocation?o.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),a,n,i);return t&&_?N.createElement(Go.Provider,{value:{location:Va({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:qr.Pop}},_):_}function GE(){let e=i_(),t=$E(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:o},n):null,null)}const XE=N.createElement(GE,null);class JE extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?N.createElement(Xo.Provider,{value:this.props.routeContext},N.createElement(Ix.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ZE(e){let{routeContext:t,match:n,children:i}=e,o=N.useContext(HE);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(Xo.Provider,{value:t},i)}function e_(e,t,n,i){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),i===void 0&&(i=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=i)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let u=e,f=(o=n)==null?void 0:o.errors;if(f!=null){let m=u.findIndex(y=>y.route.id&&(f==null?void 0:f[y.route.id])!==void 0);m>=0||Zt(!1),u=u.slice(0,Math.min(u.length,m+1))}let h=!1,p=-1;if(n&&i&&i.v7_partialHydration)for(let m=0;m=0?u=u.slice(0,p+1):u=[u[0]];break}}}return u.reduceRight((m,y,x)=>{let v,R=!1,_=null,E=null;n&&(v=f&&y.route.id?f[y.route.id]:void 0,_=y.route.errorElement||XE,h&&(p<0&&x===0?(s_("route-fallback"),R=!0,E=null):p===x&&(R=!0,E=y.route.hydrateFallbackElement||null)));let k=t.concat(u.slice(0,x+1)),P=()=>{let C;return v?C=_:R?C=E:y.route.Component?C=N.createElement(y.route.Component,null):y.route.element?C=y.route.element:C=m,N.createElement(ZE,{match:y,routeContext:{outlet:m,matches:k,isDataRoute:n!=null},children:C})};return n&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?N.createElement(JE,{location:n.location,revalidation:n.revalidation,component:_,error:v,children:P(),routeContext:{outlet:null,matches:k,isDataRoute:!0}}):P()},null)}var Lx=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Lx||{});function t_(e){let t=N.useContext(qE);return t||Zt(!1),t}function n_(e){let t=N.useContext(Xo);return t||Zt(!1),t}function r_(e){let t=n_(),n=t.matches[t.matches.length-1];return n.route.id||Zt(!1),n.route.id}function i_(){var e;let t=N.useContext(Ix),n=t_(Lx.UseRouteError),i=r_();return t!==void 0?t:(e=n.errors)==null?void 0:e[i]}const Pg={};function s_(e,t,n){Pg[e]||(Pg[e]=!0)}function o_(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ao(e){Zt(!1)}function l_(e){let{basename:t="/",children:n=null,location:i,navigationType:o=qr.Pop,navigator:a,static:u=!1,future:f}=e;Pd()&&Zt(!1);let h=t.replace(/^\/*/,"/"),p=N.useMemo(()=>({basename:h,navigator:a,static:u,future:Va({v7_relativeSplatPath:!1},f)}),[h,f,a,u]);typeof i=="string"&&(i=Ga(i));let{pathname:m="/",search:y="",hash:x="",state:v=null,key:R="default"}=i,_=N.useMemo(()=>{let E=Px(m,h);return E==null?null:{location:{pathname:E,search:y,hash:x,state:v,key:R},navigationType:o}},[h,m,y,x,v,R,o]);return _==null?null:N.createElement(Ox.Provider,{value:p},N.createElement(Go.Provider,{children:n,value:_}))}function a_(e){let{children:t,location:n}=e;return KE(Wf(t),n)}new Promise(()=>{});function Wf(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(i,o)=>{if(!N.isValidElement(i))return;let a=[...t,o];if(i.type===N.Fragment){n.push.apply(n,Wf(i.props.children,a));return}i.type!==Ao&&Zt(!1),!i.props.index||!i.props.children||Zt(!1);let u={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=Wf(i.props.children,a)),n.push(u)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const u_="6";try{window.__reactRouterVersion=u_}catch{}const c_="startTransition",Ng=gv[c_];function f_(e){let{basename:t,children:n,future:i,window:o}=e,a=N.useRef();a.current==null&&(a.current=kE({window:o,v5Compat:!0}));let u=a.current,[f,h]=N.useState({action:u.action,location:u.location}),{v7_startTransition:p}=i||{},m=N.useCallback(y=>{p&&Ng?Ng(()=>h(y)):h(y)},[h,p]);return N.useLayoutEffect(()=>u.listen(m),[u,m]),N.useEffect(()=>o_(i),[i]),N.createElement(l_,{basename:t,children:n,location:f.location,navigationType:f.action,navigator:u,future:i})}var Og;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Og||(Og={}));var Ig;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ig||(Ig={}));function Dx(e,t){return function(){return e.apply(t,arguments)}}const{toString:d_}=Object.prototype,{getPrototypeOf:_s}=Object,{iterator:Jo,toStringTag:jx}=Symbol,Ha=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Uo=(e,t)=>{let n=e;const i=[];for(;n!=null&&n!==Object.prototype;){if(i.indexOf(n)!==-1)return!1;if(i.push(n),Ha(n,t))return!0;n=_s(n)}return!1},h_=(e,t)=>e!=null&&Uo(e,t)?e[t]:void 0,Od=(e=>t=>{const n=d_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dn=e=>(e=e.toLowerCase(),t=>Od(t)===e),Xa=e=>t=>typeof t===e,{isArray:Pi}=Array,Cs=Xa("undefined");function Ts(e){return e!==null&&!Cs(e)&&e.constructor!==null&&!Cs(e.constructor)&&Xt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fx=Dn("ArrayBuffer");function p_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Fx(e.buffer),t}const m_=Xa("string"),Xt=Xa("function"),Mx=Xa("number"),Rs=e=>e!==null&&typeof e=="object",g_=e=>e===!0||e===!1,Na=e=>{if(!Rs(e))return!1;const t=_s(e);return(t===null||t===Object.prototype||_s(t)===null)&&!Uo(e,jx)&&!Uo(e,Jo)},y_=e=>{if(!Rs(e)||Ts(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},v_=Dn("Date"),x_=Dn("File"),w_=e=>!!(e&&typeof e.uri<"u"),b_=e=>e&&typeof e.getParts<"u",k_=Dn("Blob"),S_=Dn("FileList"),E_=e=>Rs(e)&&Xt(e.pipe);function __(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Lg=__(),Dg=typeof Lg.FormData<"u"?Lg.FormData:void 0,C_=e=>{if(!e)return!1;if(Dg&&e instanceof Dg)return!0;const t=_s(e);if(!t||t===Object.prototype||!Xt(e.append))return!1;const n=Od(e);return n==="formdata"||n==="object"&&Xt(e.toString)&&e.toString()==="[object FormData]"},A_=Dn("URLSearchParams"),[T_,R_,P_,N_]=["ReadableStream","Request","Response","Headers"].map(Dn),O_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,o;if(typeof e!="object"&&(e=[e]),Pi(e))for(i=0,o=e.length;i0;)if(o=n[i],t===o.toLowerCase())return o;return null}const pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ux=e=>!Cs(e)&&e!==pi;function Qf(...e){const{caseless:t,skipUndefined:n}=Ux(this)&&this||{},i={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const f=t&&typeof u=="string"&&zx(i,u)||u,h=Ha(i,f)?i[f]:void 0;Na(h)&&Na(a)?i[f]=Qf(h,a):Na(a)?i[f]=Qf({},a):Pi(a)?i[f]=a.slice():(!n||!Cs(a))&&(i[f]=a)};for(let a=0,u=e.length;a(Zo(t,(o,a)=>{n&&Xt(o)?Object.defineProperty(e,a,{__proto__:null,value:Dx(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),L_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),D_=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},j_=(e,t,n,i)=>{let o,a,u;const f={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!i||i(u,e,t))&&!f[u]&&(t[u]=e[u],f[u]=!0);e=n!==!1&&_s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},F_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},M_=e=>{if(!e)return null;if(Pi(e))return e;let t=e.length;if(!Mx(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},z_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_s(Uint8Array)),U_=(e,t)=>{const i=(e&&e[Jo]).call(e);let o;for(;(o=i.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},B_=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},$_=Dn("HTMLFormElement"),V_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,o){return i.toUpperCase()+o}),{propertyIsEnumerable:H_}=Object.prototype,q_=Dn("RegExp"),Bx=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Zo(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(i[a]=u||o)}),Object.defineProperties(e,i)},W_=e=>{Bx(e,(t,n)=>{if(Xt(e)&&["arguments","caller","callee"].includes(n))return!1;const i=e[n];if(Xt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Q_=(e,t)=>{const n={},i=o=>{o.forEach(a=>{n[a]=!0})};return Pi(e)?i(e):i(String(e).split(t)),n},K_=()=>{},Y_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function G_(e){return!!(e&&Xt(e.append)&&e[jx]==="FormData"&&e[Jo])}const X_=e=>{const t=new WeakSet,n=i=>{if(Rs(i)){if(t.has(i))return;if(Ts(i))return i;if(!("toJSON"in i)){t.add(i);const o=Pi(i)?[]:{};return Zo(i,(a,u)=>{const f=n(a);!Cs(f)&&(o[u]=f)}),t.delete(i),o}}return i};return n(e)},J_=Dn("AsyncFunction"),Z_=e=>e&&(Rs(e)||Xt(e))&&Xt(e.then)&&Xt(e.catch),$x=((e,t)=>e?setImmediate:t?((n,i)=>(pi.addEventListener("message",({source:o,data:a})=>{o===pi&&a===n&&i.length&&i.shift()()},!1),o=>{i.push(o),pi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Xt(pi.postMessage)),eC=typeof queueMicrotask<"u"?queueMicrotask.bind(pi):typeof process<"u"&&process.nextTick||$x,Vx=e=>e!=null&&Xt(e[Jo]),tC=e=>e!=null&&Uo(e,Jo)&&Vx(e),M={isArray:Pi,isArrayBuffer:Fx,isBuffer:Ts,isFormData:C_,isArrayBufferView:p_,isString:m_,isNumber:Mx,isBoolean:g_,isObject:Rs,isPlainObject:Na,isEmptyObject:y_,isReadableStream:T_,isRequest:R_,isResponse:P_,isHeaders:N_,isUndefined:Cs,isDate:v_,isFile:x_,isReactNativeBlob:w_,isReactNative:b_,isBlob:k_,isRegExp:q_,isFunction:Xt,isStream:E_,isURLSearchParams:A_,isTypedArray:z_,isFileList:S_,forEach:Zo,merge:Qf,extend:I_,trim:O_,stripBOM:L_,inherits:D_,toFlatObject:j_,kindOf:Od,kindOfTest:Dn,endsWith:F_,toArray:M_,forEachEntry:U_,matchAll:B_,isHTMLForm:$_,hasOwnProperty:Ha,hasOwnProp:Ha,hasOwnInPrototypeChain:Uo,getSafeProp:h_,reduceDescriptors:Bx,freezeMethods:W_,toObjectSet:Q_,toCamelCase:V_,noop:K_,toFiniteNumber:Y_,findKey:zx,global:pi,isContextDefined:Ux,isSpecCompliantForm:G_,toJSONObject:X_,isAsyncFn:J_,isThenable:Z_,setImmediate:$x,asap:eC,isIterable:Vx,isSafeIterable:tC},nC=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),rC=e=>{const t={};let n,i,o;return e&&e.split(` `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),i=u.substring(o+1).trim(),!(!n||t[n]&&nC[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t};function iC(e){let t=0,n=e.length;for(;tt;){const i=e.charCodeAt(n-1);if(i!==9&&i!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const sC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),oC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Id(e,t){return M.isArray(e)?e.map(n=>Id(n,t)):iC(String(e).replace(t,""))}const lC=e=>Id(e,sC),aC=e=>Id(e,oC);function Hx(e){const t=Object.create(null);return M.forEach(e.toJSON(),(n,i)=>{t[i]=aC(n)}),t}const jg=Symbol("internals");function vo(e){return e&&String(e).trim().toLowerCase()}function Oa(e){return e===!1||e==null?e:M.isArray(e)?e.map(Oa):lC(String(e))}function uC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const cC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ef(e,t,n,i,o){if(M.isFunction(i))return i.call(this,t,n);if(o&&(t=n),!!M.isString(t)){if(M.isString(i))return t.indexOf(i)!==-1;if(M.isRegExp(i))return i.test(t)}}function fC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function dC(e,t){const n=M.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{__proto__:null,value:function(o,a,u){return this[i].call(this,t,o,a,u)},configurable:!0})})}let It=class{constructor(t){t&&this.set(t)}set(t,n,i){const o=this;function a(f,h,p){const m=vo(h);if(!m)return;const y=M.findKey(o,m);(!y||o[y]===void 0||p===!0||p===void 0&&o[y]!==!1)&&(o[y||h]=Oa(f))}const u=(f,h)=>M.forEach(f,(p,m)=>a(p,m,h));if(M.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(M.isString(t)&&(t=t.trim())&&!cC(t))u(rC(t),n);else if(M.isObject(t)&&M.isSafeIterable(t)){let f=Object.create(null),h,p;for(const m of t){if(!M.isArray(m))throw new TypeError("Object iterator must return a key-value pair");p=m[0],M.hasOwnProp(f,p)?(h=f[p],f[p]=M.isArray(h)?[...h,m[1]]:[h,m[1]]):f[p]=m[1]}u(f,n)}else t!=null&&a(n,t,i);return this}get(t,n){if(t=vo(t),t){const i=M.findKey(this,t);if(i){const o=this[i];if(!n)return o;if(n===!0)return uC(o);if(M.isFunction(n))return n.call(this,o,i);if(M.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=vo(t),t){const i=M.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||ef(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let o=!1;function a(u){if(u=vo(u),u){const f=M.findKey(i,u);f&&(!n||ef(i,i[f],f,n))&&(delete i[f],o=!0)}}return M.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let i=n.length,o=!1;for(;i--;){const a=n[i];(!t||ef(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,i={};return M.forEach(this,(o,a)=>{const u=M.findKey(i,a);if(u){n[u]=Oa(o),delete n[a];return}const f=t?fC(a):String(a).trim();f!==a&&delete n[a],n[f]=Oa(o),i[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return M.forEach(this,(i,o)=>{i!=null&&i!==!1&&(n[o]=t&&M.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(o=>i.set(o)),i}static accessor(t){const i=(this[jg]=this[jg]={accessors:{}}).accessors,o=this.prototype;function a(u){const f=vo(u);i[f]||(dC(o,u),i[f]=!0)}return M.isArray(t)?t.forEach(a):a(t),this}};It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);M.reduceDescriptors(It.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});M.freezeMethods(It);const hC="[REDACTED ****]";function pC(e){if(M.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(M.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function mC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),i=[],o=a=>{if(a===null||typeof a!="object"||M.isBuffer(a))return a;if(i.indexOf(a)!==-1)return;a instanceof It&&(a=a.toJSON()),i.push(a);let u;if(M.isArray(a))u=[],a.forEach((f,h)=>{const p=o(f);M.isUndefined(p)||(u[h]=p)});else{if(!M.isPlainObject(a)&&pC(a))return i.pop(),a;u=Object.create(null);for(const[f,h]of Object.entries(a)){const p=n.has(f.toLowerCase())?hC:o(h);M.isUndefined(p)||(u[f]=p)}}return i.pop(),u};return o(e)}let le=class qx extends Error{static from(t,n,i,o,a,u){const f=new qx(t.message,n||t.code,i,o,a);return Object.defineProperty(f,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),f.name=t.name,t.status!=null&&f.status==null&&(f.status=t.status),u&&Object.assign(f,u),f}constructor(t,n,i,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),i&&(this.config=i),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&M.hasOwnProp(t,"redact")?t.redact:void 0,i=M.isArray(n)&&n.length>0?mC(t,n):M.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};le.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";le.ERR_BAD_OPTION="ERR_BAD_OPTION";le.ECONNABORTED="ECONNABORTED";le.ETIMEDOUT="ETIMEDOUT";le.ECONNREFUSED="ECONNREFUSED";le.ERR_NETWORK="ERR_NETWORK";le.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";le.ERR_DEPRECATED="ERR_DEPRECATED";le.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";le.ERR_BAD_REQUEST="ERR_BAD_REQUEST";le.ERR_CANCELED="ERR_CANCELED";le.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";le.ERR_INVALID_URL="ERR_INVALID_URL";le.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const gC=null,Wx=100;function Kf(e){return M.isPlainObject(e)||M.isArray(e)}function Qx(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function tf(e,t,n){return e?e.concat(t).map(function(o,a){return o=Qx(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function yC(e){return M.isArray(e)&&!e.some(Kf)}const vC=M.toFlatObject(M,{},null,function(t){return/^is[A-Z]/.test(t)});function Ja(e,t,n){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=M.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,C){return!M.isUndefined(C[P])});const i=n.metaTokens,o=n.visitor||R,a=n.dots,u=n.indexes,f=n.Blob||typeof Blob<"u"&&Blob,h=n.maxDepth===void 0?Wx:n.maxDepth,p=f&&M.isSpecCompliantForm(t),m=[];if(!M.isFunction(o))throw new TypeError("visitor must be a function");function y(k){if(k===null)return"";if(M.isDate(k))return k.toISOString();if(M.isBoolean(k))return k.toString();if(!p&&M.isBlob(k))throw new le("Blob is not supported. Use a Buffer instead.");if(M.isArrayBuffer(k)||M.isTypedArray(k)){if(p&&typeof f=="function")return new f([k]);if(typeof Buffer<"u")return Buffer.from(k);throw new le("Blob is not supported. Use a Buffer instead.",le.ERR_NOT_SUPPORT)}return k}function x(k){if(k>h)throw new le("Object is too deeply nested ("+k+" levels). Max depth: "+h,le.ERR_FORM_DATA_DEPTH_EXCEEDED)}function v(k,P){if(h===1/0)return JSON.stringify(k);const C=[];return JSON.stringify(k,function(V,O){if(!M.isObject(O))return O;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(O),x(P+C.length-1),O})}function R(k,P,C){let D=k;if(M.isReactNative(t)&&M.isReactNativeBlob(k))return t.append(tf(C,P,a),y(k)),!1;if(k&&!C&&typeof k=="object"){if(M.endsWith(P,"{}"))P=i?P:P.slice(0,-2),k=v(k,1);else if(M.isArray(k)&&yC(k)||(M.isFileList(k)||M.endsWith(P,"[]"))&&(D=M.toArray(k)))return P=Qx(P),D.forEach(function(O,Q){!(M.isUndefined(O)||O===null)&&t.append(u===!0?tf([P],Q,a):u===null?P:P+"[]",y(O))}),!1}return Kf(k)?!0:(t.append(tf(C,P,a),y(k)),!1)}const _=Object.assign(vC,{defaultVisitor:R,convertValue:y,isVisitable:Kf});function E(k,P,C=0){if(!M.isUndefined(k)){if(x(C),m.indexOf(k)!==-1)throw new Error("Circular reference detected in "+P.join("."));m.push(k),M.forEach(k,function(V,O){(!(M.isUndefined(V)||V===null)&&o.call(t,V,M.isString(O)?O.trim():O,P,_))===!0&&E(V,P?P.concat(O):[O],C+1)}),m.pop()}}if(!M.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Fg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Ld(e,t){this._pairs=[],e&&Ja(e,this,t)}const Kx=Ld.prototype;Kx.append=function(t,n){this._pairs.push([t,n])};Kx.toString=function(t){const n=t?i=>t.call(this,i,Fg):Fg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function xC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yx(e,t,n){if(!t)return e;e=e||"";const i=M.isFunction(n)?{serialize:n}:n,o=M.getSafeProp(i,"encode")||xC,a=M.getSafeProp(i,"serialize");let u;if(a?u=a(t,i):u=M.isURLSearchParams(t)?t.toString():new Ld(t,i).toString(o),u){const f=e.indexOf("#");f!==-1&&(e=e.slice(0,f)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class Mg{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Dd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},wC=typeof URLSearchParams<"u"?URLSearchParams:Ld,bC=typeof FormData<"u"?FormData:null,kC=typeof Blob<"u"?Blob:null,SC={isBrowser:!0,classes:{URLSearchParams:wC,FormData:bC,Blob:kC},protocols:["http","https","file","blob","url","data"]},jd=typeof window<"u"&&typeof document<"u",Yf=typeof navigator=="object"&&navigator||void 0,EC=jd&&(!Yf||["ReactNative","NativeScript","NS"].indexOf(Yf.product)<0),_C=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",CC=jd&&window.location.href||"http://localhost",AC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jd,hasStandardBrowserEnv:EC,hasStandardBrowserWebWorkerEnv:_C,navigator:Yf,origin:CC},Symbol.toStringTag,{value:"Module"})),Ct={...AC,...SC};function TC(e,t){return Ja(e,new Ct.classes.URLSearchParams,{visitor:function(n,i,o,a){return Ct.isNode&&M.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}const zg=Wx;function Gx(e){if(e>zg)throw new le("FormData field is too deeply nested ("+e+" levels). Max depth: "+zg,le.ERR_FORM_DATA_DEPTH_EXCEEDED)}function RC(e){const t=[],n=/\w+|\[(\w*)]/g;let i;for(;(i=n.exec(e))!==null;)Gx(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function PC(e){const t={},n=Object.keys(e);let i;const o=n.length;let a;for(i=0;i=n.length;return u=!u&&M.isArray(o)?o.length:u,h?(M.hasOwnProp(o,u)?o[u]=M.isArray(o[u])?o[u].concat(i):[o[u],i]:o[u]=i,!f):((!M.hasOwnProp(o,u)||!M.isObject(o[u]))&&(o[u]=[]),t(n,i,o[u],a)&&M.isArray(o[u])&&(o[u]=PC(o[u])),!f)}if(M.isFormData(e)&&M.isFunction(e.entries)){const n={};return M.forEachEntry(e,(i,o)=>{t(RC(i),o,n,0)}),n}return null}const is=(e,t)=>e!=null&&M.hasOwnProp(e,t)?e[t]:void 0;function NC(e,t,n){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const el={transitional:Dd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",o=i.indexOf("application/json")>-1,a=M.isObject(t);if(a&&M.isHTMLForm(t)&&(t=new FormData(t)),M.isFormData(t))return o?JSON.stringify(Xx(t)):t;if(M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t)||M.isReadableStream(t))return t;if(M.isArrayBufferView(t))return t.buffer;if(M.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(a){const h=is(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return TC(t,h).toString();if((f=M.isFileList(t))||i.indexOf("multipart/form-data")>-1){const p=is(this,"env"),m=p&&p.FormData;return Ja(f?{"files[]":t}:t,m&&new m,h)}}return a||o?(n.setContentType("application/json",!1),NC(t)):t}],transformResponse:[function(t){const n=is(this,"transitional")||el.transitional,i=n&&n.forcedJSONParsing,o=is(this,"responseType"),a=o==="json";if(M.isResponse(t)||M.isReadableStream(t))return t;if(t&&M.isString(t)&&(i&&!o||a)){const f=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,is(this,"parseReviver"))}catch(h){if(f)throw h.name==="SyntaxError"?le.from(h,le.ERR_BAD_RESPONSE,this,null,is(this,"response")):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ct.classes.FormData,Blob:Ct.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch","query"],e=>{el.headers[e]={}});function nf(e,t){const n=this||el,i=t||n,o=It.from(i.headers);let a=i.data;return M.forEach(e,function(f){a=f.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Jx(e){return!!(e&&e.__CANCEL__)}let tl=class extends le{constructor(t,n,i){super(t??"canceled",le.ERR_CANCELED,n,i),this.name="CanceledError",this.__CANCEL__=!0}};function Zx(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new le("Request failed with status code "+n.status,n.status>=400&&n.status<500?le.ERR_BAD_REQUEST:le.ERR_BAD_RESPONSE,n.config,n.request,n))}function OC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function IC(e,t){e=e||10;const n=new Array(e),i=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(h){const p=Date.now(),m=i[a];u||(u=p),n[o]=h,i[o]=p;let y=a,x=0;for(;y!==o;)x+=n[y++],y=y%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),p-u{n=m,o=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),y=m-n;y>=i?u(p,m):(o=p,a||(a=setTimeout(()=>{a=null,u(o)},i-y)))},()=>o&&u(o)]}const qa=(e,t,n=3)=>{let i=0;const o=IC(50,250);return LC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,f=a.lengthComputable?a.total:void 0,h=f!=null?Math.min(u,f):u,p=Math.max(0,h-i),m=o(p);i=Math.max(i,h);const y={loaded:h,total:f,progress:f?h/f:void 0,bytes:p,rate:m||void 0,estimated:m&&f?(f-h)/m:void 0,event:a,lengthComputable:f!=null,[t?"download":"upload"]:!0};e(y)},n)},Ug=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},Bg=e=>(...t)=>M.asap(()=>e(...t)),DC=Ct.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ct.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ct.origin),Ct.navigator&&/(msie|trident)/i.test(Ct.navigator.userAgent)):()=>!0,jC=Ct.hasStandardBrowserEnv?{write(e,t,n,i,o,a,u){if(typeof document>"u")return;const f=[`${e}=${encodeURIComponent(t)}`];M.isNumber(n)&&f.push(`expires=${new Date(n).toUTCString()}`),M.isString(i)&&f.push(`path=${i}`),M.isString(o)&&f.push(`domain=${o}`),a===!0&&f.push("secure"),M.isString(u)&&f.push(`SameSite=${u}`),document.cookie=f.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof It?{...e}:e;function Ni(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(m,y,x,v){return M.isPlainObject(m)&&M.isPlainObject(y)?M.merge.call({caseless:v},m,y):M.isPlainObject(y)?M.merge({},y):M.isArray(y)?y.slice():y}function o(m,y,x,v){if(M.isUndefined(y)){if(!M.isUndefined(m))return i(void 0,m,x,v)}else return i(m,y,x,v)}function a(m,y){if(!M.isUndefined(y))return i(void 0,y)}function u(m,y){if(M.isUndefined(y)){if(!M.isUndefined(m))return i(void 0,m)}else return i(void 0,y)}function f(m){const y=M.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!M.isUndefined(y))if(M.isPlainObject(y)){if(M.hasOwnProp(y,m))return y[m]}else return;const x=M.hasOwnProp(e,"transitional")?e.transitional:void 0;if(M.isPlainObject(x)&&M.hasOwnProp(x,m))return x[m]}function h(m,y,x){if(M.hasOwnProp(t,x))return i(m,y);if(M.hasOwnProp(e,x))return i(void 0,m)}const p={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:h,headers:(m,y,x)=>o(Vg(m),Vg(y),x,!0)};return M.forEach(Object.keys({...e,...t}),function(y){if(y==="__proto__"||y==="constructor"||y==="prototype")return;const x=M.hasOwnProp(p,y)?p[y]:o,v=M.hasOwnProp(e,y)?e[y]:void 0,R=M.hasOwnProp(t,y)?t[y]:void 0,_=x(v,R,y);M.isUndefined(_)&&x!==h||(n[y]=_)}),M.hasOwnProp(t,"validateStatus")&&M.isUndefined(t.validateStatus)&&f("validateStatusUndefinedResolves")===!1&&(M.hasOwnProp(e,"validateStatus")?n.validateStatus=i(void 0,e.validateStatus):delete n.validateStatus),n}const VC=["content-type","content-length"];function HC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([i,o])=>{VC.includes(i.toLowerCase())&&e.set(i,o)})}const qC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function tw(e){const t=Ni({},e),n=x=>M.hasOwnProp(t,x)?t[x]:void 0,i=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let f=n("headers");const h=n("auth"),p=n("baseURL"),m=n("allowAbsoluteUrls"),y=n("url");if(t.headers=f=It.from(f),t.url=Yx(ew(p,y,m,t),n("params"),n("paramsSerializer")),h){const x=M.getSafeProp(h,"username")||"",v=M.getSafeProp(h,"password")||"";try{f.set("Authorization","Basic "+btoa(x+":"+(v?qC(v):"")))}catch(R){throw le.from(R,le.ERR_BAD_OPTION_VALUE,e)}}if(M.isFormData(i)&&(Ct.hasStandardBrowserEnv||Ct.hasStandardBrowserWebWorkerEnv||M.isReactNative(i)?f.setContentType(void 0):M.isFunction(i.getHeaders)&&HC(f,i.getHeaders(),n("formDataHeaderPolicy"))),Ct.hasStandardBrowserEnv&&(M.isFunction(o)&&(o=o(t)),o===!0||o==null&&DC(t.url))){const v=a&&u&&jC.read(u);v&&f.set(a,v)}return t}const WC=typeof XMLHttpRequest<"u",QC=WC&&function(e){return new Promise(function(n,i){const o=tw(e);let a=o.data;const u=It.from(o.headers).normalize();let{responseType:f,onUploadProgress:h,onDownloadProgress:p}=o,m,y,x,v,R;function _(){v&&v(),R&&R(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(o.method.toUpperCase(),o.url,!0),E.timeout=o.timeout;function k(){if(!E)return;const C=It.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),V={data:!f||f==="text"||f==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:C,config:e,request:E};Zx(function(Q){n(Q),_()},function(Q){i(Q),_()},V),E=null}"onloadend"in E?E.onloadend=k:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(k)},E.onabort=function(){E&&(i(new le("Request aborted",le.ECONNABORTED,e,E)),_(),E=null)},E.onerror=function(D){const V=D&&D.message?D.message:"Network Error",O=new le(V,le.ERR_NETWORK,e,E);O.event=D||null,i(O),_(),E=null},E.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const V=o.transitional||Dd;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),i(new le(D,V.clarifyTimeoutError?le.ETIMEDOUT:le.ECONNABORTED,e,E)),_(),E=null},a===void 0&&u.setContentType(null),"setRequestHeader"in E&&M.forEach(Hx(u),function(D,V){E.setRequestHeader(V,D)}),M.isUndefined(o.withCredentials)||(E.withCredentials=!!o.withCredentials),f&&f!=="json"&&(E.responseType=o.responseType),p&&([x,R]=qa(p,!0),E.addEventListener("progress",x)),h&&E.upload&&([y,v]=qa(h),E.upload.addEventListener("progress",y),E.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(m=C=>{E&&(i(!C||C.type?new tl(null,e,E):C),E.abort(),_(),E=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const P=OC(o.url);if(P&&!Ct.protocols.includes(P)){i(new le("Unsupported protocol "+P+":",le.ERR_BAD_REQUEST,e)),_();return}E.send(a||null)})},KC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let i=!1;const o=function(h){if(!i){i=!0,u();const p=h instanceof Error?h:this.reason;n.abort(p instanceof le?p:new tl(p instanceof Error?p.message:p))}};let a=t&&setTimeout(()=>{a=null,o(new le(`timeout of ${t}ms exceeded`,le.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(o):h.removeEventListener("abort",o)}),e=null)};e.forEach(h=>h.addEventListener("abort",o,{once:!0}));const{signal:f}=n;return f.unsubscribe=()=>M.asap(u),f},YC=function*(e,t){let n=e.byteLength;if(n{const o=GC(e,t);let a=0,u,f=h=>{u||(u=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:p,value:m}=await o.next();if(p){f(),h.close();return}let y=m.byteLength;if(n){let x=a+=y;n(x)}h.enqueue(new Uint8Array(m))}catch(p){throw f(p),p}},cancel(h){return f(h),o.return()}},{highWaterMark:2})},Wa=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,JC=(e,t,n)=>t+2v>=2&&i.charCodeAt(v-2)===37&&i.charCodeAt(v-1)===51&&(i.charCodeAt(v)===68||i.charCodeAt(v)===100);p>=0&&(i.charCodeAt(p)===61?(h++,p--):m(p)&&(h++,p-=3)),h===1&&p>=0&&(i.charCodeAt(p)===61||m(p))&&h++;const x=Math.floor(u/4)*3-(h||0);return x>0?x:0}let a=0;for(let u=0,f=i.length;u=55296&&h<=56319&&u+1=56320&&p<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Fd="1.18.1",qg=64*1024,{isFunction:ba}=M,eA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Wg=e=>{if(!M.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Qg=(e,...t)=>{try{return!!e(...t)}catch{return!1}},tA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},nA=e=>{const t=M.global!==void 0&&M.global!==null?M.global:globalThis,{ReadableStream:n,TextEncoder:i}=t;e=M.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,f=o?ba(o):typeof fetch=="function",h=ba(a),p=ba(u);if(!f)return!1;const m=f&&ba(n),y=f&&(typeof i=="function"?(k=>P=>k.encode(P))(new i):async k=>new Uint8Array(await new a(k).arrayBuffer())),x=h&&m&&Qg(()=>{let k=!1;const P=new a(Ct.origin,{body:new n,method:"POST",get duplex(){return k=!0,"half"}}),C=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),k&&!C}),v=p&&m&&Qg(()=>M.isReadableStream(new u("").body)),R={stream:v&&(k=>k.body)};f&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!R[k]&&(R[k]=(P,C)=>{let D=P&&P[k];if(D)return D.call(P);throw new le(`Response type '${k}' is not supported`,le.ERR_NOT_SUPPORT,C)})});const _=async k=>{if(k==null)return 0;if(M.isBlob(k))return k.size;if(M.isSpecCompliantForm(k))return(await new a(Ct.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(M.isArrayBufferView(k)||M.isArrayBuffer(k))return k.byteLength;if(M.isURLSearchParams(k)&&(k=k+""),M.isString(k))return(await y(k)).byteLength},E=async(k,P)=>{const C=M.toFiniteNumber(k.getContentLength());return C??_(P)};return async k=>{let{url:P,method:C,data:D,signal:V,cancelToken:O,timeout:Q,onDownloadProgress:z,onUploadProgress:K,responseType:G,headers:Z,withCredentials:re="same-origin",fetchOptions:ue,maxContentLength:W,maxBodyLength:Y}=tw(k);const ce=M.isNumber(W)&&W>-1,xe=M.isNumber(Y)&&Y>-1,ee=ne=>M.hasOwnProp(k,ne)?k[ne]:void 0;let ae=o||fetch;G=G?(G+"").toLowerCase():"text";let S=KC([V,O&&O.toAbortSignal()],Q),L=null;const H=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let A,ye=null;const be=()=>new le("Request body larger than maxBodyLength limit",le.ERR_BAD_REQUEST,k,L);try{let ne;const Ce=ee("auth");if(Ce){const Te=M.getSafeProp(Ce,"username")||"",lt=M.getSafeProp(Ce,"password")||"";ne={username:Te,password:lt}}if(tA(P)){const Te=new URL(P,Ct.origin);if(!ne&&(Te.username||Te.password)){const lt=Wg(Te.username),nn=Wg(Te.password);ne={username:lt,password:nn}}(Te.username||Te.password)&&(Te.username="",Te.password="",P=Te.href)}if(ne&&(Z.delete("authorization"),Z.set("Authorization","Basic "+btoa(eA((ne.username||"")+":"+(ne.password||""))))),ce&&typeof P=="string"&&P.startsWith("data:")&&ZC(P)>W)throw new le("maxContentLength size of "+W+" exceeded",le.ERR_BAD_RESPONSE,k,L);if(xe&&C!=="get"&&C!=="head"){const Te=await _(D);if(typeof Te=="number"&&isFinite(Te)&&(A=Te,Te>Y))throw be()}const Ne=xe&&(M.isReadableStream(D)||M.isStream(D)),ke=(Te,lt,nn)=>Hg(Te,qg,Bt=>{if(xe&&Bt>Y)throw ye=be();lt&<(Bt)},nn);if(x&&C!=="get"&&C!=="head"&&(K||Ne)){if(A=A??await E(Z,D),A!==0||Ne){let Te=new a(P,{method:"POST",body:D,duplex:"half"}),lt;if(M.isFormData(D)&&(lt=Te.headers.get("content-type"))&&Z.setContentType(lt),Te.body){const[nn,Bt]=K&&Ug(A,qa(Bg(K)))||[];D=ke(Te.body,nn,Bt)}}}else if(Ne&&!h&&m&&C!=="get"&&C!=="head")D=ke(D);else if(Ne&&h&&!x&&C!=="get"&&C!=="head")throw new le("Stream request bodies are not supported by the current fetch implementation",le.ERR_NOT_SUPPORT,k,L);M.isString(re)||(re=re?"include":"omit");const Ge=h&&"credentials"in a.prototype;if(M.isFormData(D)){const Te=Z.getContentType();Te&&/^multipart\/form-data/i.test(Te)&&!/boundary=/i.test(Te)&&Z.delete("content-type")}Z.set("User-Agent","axios/"+Fd,!1);const xt={...ue,signal:S,method:C.toUpperCase(),headers:Hx(Z.normalize()),body:D,duplex:"half",credentials:Ge?re:void 0};L=h&&new a(P,xt);let ft=await(h?ae(L,ue):ae(P,xt));const tn=It.from(ft.headers);if(ce){const Te=M.toFiniteNumber(tn.getContentLength());if(Te!=null&&Te>W)throw new le("maxContentLength size of "+W+" exceeded",le.ERR_BAD_RESPONSE,k,L)}const Ut=v&&(G==="stream"||G==="response");if(v&&ft.body&&(z||ce||Ut&&H)){const Te={};["status","statusText","headers"].forEach(En=>{Te[En]=ft[En]});const lt=M.toFiniteNumber(tn.getContentLength()),[nn,Bt]=z&&Ug(lt,qa(Bg(z),!0))||[];let Sn=0;const jn=En=>{if(ce&&(Sn=En,Sn>W))throw new le("maxContentLength size of "+W+" exceeded",le.ERR_BAD_RESPONSE,k,L);nn&&nn(En)};ft=new u(Hg(ft.body,qg,jn,()=>{Bt&&Bt(),H&&H()}),Te)}G=G||"text";let Dt=await R[M.findKey(R,G)||"text"](ft,k);if(ce&&!v&&!Ut){let Te;if(Dt!=null&&(typeof Dt.byteLength=="number"?Te=Dt.byteLength:typeof Dt.size=="number"?Te=Dt.size:typeof Dt=="string"&&(Te=typeof i=="function"?new i().encode(Dt).byteLength:Dt.length)),typeof Te=="number"&&Te>W)throw new le("maxContentLength size of "+W+" exceeded",le.ERR_BAD_RESPONSE,k,L)}return!Ut&&H&&H(),await new Promise((Te,lt)=>{Zx(Te,lt,{data:Dt,headers:It.from(ft.headers),status:ft.status,statusText:ft.statusText,config:k,request:L})})}catch(ne){if(H&&H(),S&&S.aborted&&S.reason instanceof le){const Ce=S.reason;throw Ce.config=k,L&&(Ce.request=L),ne!==Ce&&Object.defineProperty(Ce,"cause",{__proto__:null,value:ne,writable:!0,enumerable:!1,configurable:!0}),Ce}if(ye)throw L&&!ye.request&&(ye.request=L),ye;if(ne instanceof le)throw L&&!ne.request&&(ne.request=L),ne;if(ne&&ne.name==="TypeError"&&/Load failed|fetch/i.test(ne.message)){const Ce=new le("Network Error",le.ERR_NETWORK,k,L,ne&&ne.response);throw Object.defineProperty(Ce,"cause",{__proto__:null,value:ne.cause||ne,writable:!0,enumerable:!1,configurable:!0}),Ce}throw le.from(ne,ne&&ne.code,k,L,ne&&ne.response)}}},rA=new Map,nw=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:o}=t,a=[i,o,n];let u=a.length,f=u,h,p,m=rA;for(;f--;)h=a[f],p=m.get(h),p===void 0&&m.set(h,p=f?new Map:nA(t)),m=p;return p};nw();const Md={http:gC,xhr:QC,fetch:{get:nw}};M.forEach(Md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Kg=e=>`- ${e}`,iA=e=>M.isFunction(e)||e===null||e===!1;function sA(e,t){e=M.isArray(e)?e:[e];const{length:n}=e;let i,o;const a={};for(let u=0;u`adapter ${h} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=n?u.length>1?`since : `+u.map(Kg).join(` `):" "+Kg(u[0]):"as no adapter specified";throw new le("There is no suitable adapter to dispatch the request "+f,le.ERR_NOT_SUPPORT)}return o}const rw={getAdapter:sA,adapters:Md};function rf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tl(null,e)}function Yg(e){return rf(e),e.headers=It.from(e.headers),e.data=nf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rw.getAdapter(e.adapter||el.adapter,e)(e).then(function(i){rf(e),e.response=i;try{i.data=nf.call(e,e.transformResponse,i)}finally{delete e.response}return i.headers=It.from(i.headers),i},function(i){if(!Jx(i)&&(rf(e),i&&i.response)){e.response=i.response;try{i.response.data=nf.call(e,e.transformResponse,i.response)}finally{delete e.response}i.response.headers=It.from(i.response.headers)}return Promise.reject(i)})}const Za={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Za[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Gg={};Za.transitional=function(t,n,i){function o(a,u){return"[Axios v"+Fd+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,f)=>{if(t===!1)throw new le(o(u," has been removed"+(n?" in "+n:"")),le.ERR_DEPRECATED);return n&&!Gg[u]&&(Gg[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,f):!0}};Za.spelling=function(t){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function oA(e,t,n){if(typeof e!="object"||e===null)throw new le("options must be an object",le.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const a=i[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const f=e[a],h=f===void 0||u(f,a,e);if(h!==!0)throw new le("option "+a+" must be "+h,le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new le("Unknown option "+a,le.ERR_BAD_OPTION)}}const Ia={assertOptions:oA,validators:Za},Nt=Ia.validators;let _i=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Mg,response:new Mg}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(` `);return u===-1?"":o.stack.slice(u+1)})();try{if(!i.stack)i.stack=a;else if(a){const u=a.indexOf(` `),f=u===-1?-1:a.indexOf(` `,u+1),h=f===-1?"":a.slice(f+1);String(i.stack).endsWith(h)||(i.stack+=` `+a)}}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ni(this.defaults,n);const{transitional:i,paramsSerializer:o,headers:a}=n;i!==void 0&&Ia.assertOptions(i,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean),legacyInterceptorReqResOrdering:Nt.transitional(Nt.boolean),advertiseZstdAcceptEncoding:Nt.transitional(Nt.boolean),validateStatusUndefinedResolves:Nt.transitional(Nt.boolean)},!1),o!=null&&(M.isFunction(o)?n.paramsSerializer={serialize:o}:Ia.assertOptions(o,{encode:Nt.function,serialize:Nt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ia.assertOptions(n,{baseUrl:Nt.spelling("baseURL"),withXsrfToken:Nt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&M.merge(a.common,a[n.method]);a&&M.forEach(["delete","get","head","post","put","patch","query","common"],R=>{delete a[R]}),n.headers=It.concat(u,a);const f=[];let h=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(n)===!1)return;h=h&&_.synchronous;const E=n.transitional||Dd;E&&E.legacyInterceptorReqResOrdering?f.unshift(_.fulfilled,_.rejected):f.push(_.fulfilled,_.rejected)});const p=[];this.interceptors.response.forEach(function(_){p.push(_.fulfilled,_.rejected)});let m,y=0,x;if(!h){const R=[Yg.bind(this),void 0];for(R.unshift(...f),R.push(...p),x=R.length,m=Promise.resolve(n);y{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](o);i._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(f=>{i.subscribe(f),a=f}).then(o);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,f){i.reason||(i.reason=new tl(a,u,f),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new iw(function(o){t=o}),cancel:t}}};function aA(e){return function(n){return e.apply(null,n)}}function uA(e){return M.isObject(e)&&e.isAxiosError===!0}const Gf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Gf).forEach(([e,t])=>{Gf[t]=e});function sw(e){const t=new _i(e),n=Dx(_i.prototype.request,t);return M.extend(n,_i.prototype,t,{allOwnKeys:!0}),M.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return sw(Ni(e,o))},n}const ot=sw(el);ot.Axios=_i;ot.CanceledError=tl;ot.CancelToken=lA;ot.isCancel=Jx;ot.VERSION=Fd;ot.toFormData=Ja;ot.AxiosError=le;ot.Cancel=ot.CanceledError;ot.all=function(t){return Promise.all(t)};ot.spread=aA;ot.isAxiosError=uA;ot.mergeConfig=Ni;ot.AxiosHeaders=It;ot.formToJSON=e=>Xx(M.isHTMLForm(e)?new FormData(e):e);ot.getAdapter=rw.getAdapter;ot.HttpStatusCode=Gf;ot.default=ot;const{Axios:q2,AxiosError:W2,CanceledError:Q2,isCancel:K2,CancelToken:Y2,VERSION:G2,all:X2,Cancel:J2,isAxiosError:Z2,spread:e4,toFormData:t4,AxiosHeaders:n4,HttpStatusCode:r4,formToJSON:i4,getAdapter:s4,mergeConfig:o4,create:l4}=ot,ow=typeof window>"u",Xg=!ow&&window.self!==window.top,cA=!ow&&typeof document>"u",sf=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),Et=[];for(let e=0;e<256;++e)Et.push((e+256).toString(16).slice(1));function fA(e,t=0){return(Et[e[t+0]]+Et[e[t+1]]+Et[e[t+2]]+Et[e[t+3]]+"-"+Et[e[t+4]]+Et[e[t+5]]+"-"+Et[e[t+6]]+Et[e[t+7]]+"-"+Et[e[t+8]]+Et[e[t+9]]+"-"+Et[e[t+10]]+Et[e[t+11]]+Et[e[t+12]]+Et[e[t+13]]+Et[e[t+14]]+Et[e[t+15]]).toLowerCase()}let of;const dA=new Uint8Array(16);function hA(){if(!of){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");of=crypto.getRandomValues.bind(crypto)}return of(dA)}const pA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Jg={randomUUID:pA};function mA(e,t,n){var o;e=e||{};const i=e.random??((o=e.rng)==null?void 0:o.call(e))??hA();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,fA(i)}function gA(e,t,n){return Jg.randomUUID&&!e?Jg.randomUUID():mA(e)}const xo=typeof window<"u"?window:{base44SharedInstances:{}};function yA(e,t){return xo.base44SharedInstances||(xo.base44SharedInstances={}),xo.base44SharedInstances[e]||(xo.base44SharedInstances[e]={instance:t()}),xo.base44SharedInstances[e].instance}const vA="__user_heartbeat_event__",xA="__initialization_event__",wA="__session_duration_event__",Zg="analytics-enable",ey="base44_analytics_session_id",bA={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},kA="analytics",We=yA(kA,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...bA,...PA()}})),SA=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:i})=>{var o;const{maxQueueSize:a,throttleTime:u,batchSize:f}=We.config;if(!(!((o=We.config)===null||o===void 0)&&o.enabled)||cA)return{track:()=>{},cleanup:()=>{}};let h;const p=`${t}/api/apps/${n}/analytics/track/batch`,m=async C=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:C}})},y=C=>{try{const D=JSON.stringify({events:C}),V=new Blob([D],{type:"application/json"});return typeof navigator>"u"||D.length>6e4||!navigator.sendBeacon(p,V)}catch{return!1}},x=async(C,D={})=>{if(C.length===0)return;const V=await RA(i),O=C.map(TA(V));try{(!D.isBeacon||!y(O))&&await m(O)}catch{}},v=()=>{ny(x,{throttleTime:u,batchSize:f})},R=C=>{if(We.requestsQueue.length>=a)return;const D=AA();We.requestsQueue.push({...C,...D}),v()},_=()=>{ny(x,{throttleTime:u,batchSize:f}),h=ry(R),_A()},E=()=>{ty(),h==null||h(),CA(R);const C=We.requestsQueue.splice(0);x(C,{isBeacon:!0})},k=()=>{typeof window>"u"||(document.visibilityState==="hidden"?E():document.visibilityState==="visible"&&_())},P=()=>{ty(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",k)};return v(),h=ry(R),EA(R),typeof window<"u"&&window.addEventListener("visibilitychange",k),{track:R,cleanup:P}};function ty(){We.isProcessing=!1}async function ny(e,t){if(We.isProcessing)return;We.isProcessing=!0;const{throttleTime:n=1e3,batchSize:i=30}=t??{};for(;We.isProcessing&&We.requestsQueue.length>0;){const o=We.requestsQueue.splice(0,i);o.length&&await e(o),await new Promise(a=>setTimeout(a,n))}We.isProcessing=!1}function ry(e){var t;if(We.isHeartBeatProcessing||((t=We.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};We.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:vA})},We.config.heartBeatInterval);return()=>{clearInterval(n),We.isHeartBeatProcessing=!1}}function EA(e){typeof window>"u"||We.wasInitializationTracked||(We.wasInitializationTracked=!0,e({eventName:xA,properties:{referrer:document==null?void 0:document.referrer}}))}function _A(){typeof window>"u"||We.sessionStartTime!==null||(We.sessionStartTime=new Date().toISOString())}function CA(e){if(typeof window>"u"||We.sessionStartTime===null)return;const t=new Date().getTime()-new Date(We.sessionStartTime).getTime();We.sessionStartTime=null,e({eventName:wA,properties:{sessionDuration:t}})}function AA(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function TA(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let lf=null;async function RA(e){if(!We.sessionContext){if(!lf){const t=zd();lf=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}We.sessionContext=await lf}return We.sessionContext}function PA(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(Zg);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(Zg);const i=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",i),{enabled:t==="true"}}function zd(){if(typeof window>"u")return sf();try{const e=localStorage.getItem(ey);if(!e){const t=sf();return localStorage.setItem(ey,t),t}return e}catch{return sf()}}class NA extends Error{constructor(t,n,i,o,a){super(t),this.name="Base44Error",this.status=n,this.code=i,this.data=o,this.originalError=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function To({baseURL:e,headers:t={},token:n,interceptResponses:i=!0,onError:o}){const a=ot.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(a.defaults.headers.common.Authorization=`Bearer ${n}`),a.interceptors.request.use(u=>{typeof window<"u"&&window.location&&(u.headers.set("X-Origin-URL",window.location.href),u.headers.get("Authorization")||u.headers.set("X-Base44-Anonymous-Id",zd()));const f=gA();if(u.requestId=f,Xg)try{window.parent.postMessage({type:"api-request-start",requestId:f,data:{url:e+u.url,method:u.method,body:u.data instanceof FormData?"[FormData object]":u.data}},"*")}catch{}return u}),i&&a.interceptors.response.use(u=>{var f;const h=(f=u.config)===null||f===void 0?void 0:f.requestId;try{Xg&&h&&window.parent.postMessage({type:"api-request-end",requestId:h,data:{statusCode:u.status,response:u.data}},"*")}catch{}return u.data},u=>{var f,h,p,m,y,x,v,R;const _=((h=(f=u.response)===null||f===void 0?void 0:f.data)===null||h===void 0?void 0:h.message)||((m=(p=u.response)===null||p===void 0?void 0:p.data)===null||m===void 0?void 0:m.detail)||u.message,E=new NA(_,(y=u.response)===null||y===void 0?void 0:y.status,(v=(x=u.response)===null||x===void 0?void 0:x.data)===null||v===void 0?void 0:v.code,(R=u.response)===null||R===void 0?void 0:R.data,u);return o==null||o(E),Promise.reject(E)}),a}function iy(e){const{axios:t,appId:n,getSocket:i}=e;return new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return IA(t,n,a,i)}})}function OA(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function IA(e,t,n,i){const o=`/apps/${t}/entities/${n}`;return{async list(a,u,f,h){const p={};return a&&(p.sort=a),u&&(p.limit=u),f&&(p.skip=f),h&&(p.fields=Array.isArray(h)?h.join(","):h),e.get(o,{params:p})},async filter(a,u,f,h,p){const m={q:JSON.stringify(a)};return u&&(m.sort=u),f&&(m.limit=f),h&&(m.skip=h),p&&(m.fields=Array.isArray(p)?p.join(","):p),e.get(o,{params:m})},async get(a){return e.get(`${o}/${a}`)},async create(a){return e.post(o,a)},async update(a,u){return e.put(`${o}/${a}`,u)},async delete(a){return e.delete(`${o}/${a}`)},async deleteMany(a){return e.delete(o,{data:a})},async bulkCreate(a){return e.post(`${o}/bulk`,a)},async updateMany(a,u){return e.patch(`${o}/update-many`,{query:a,data:u})},async bulkUpdate(a){return e.put(`${o}/bulk`,a)},async importEntities(a){const u=new FormData;return u.append("file",a,a.name),e.post(`${o}/import`,u,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(a){const u=`entities:${t}:${n}`;return i().subscribeToRoom(u,{update_model:p=>{var m;const y=OA(p.data);if(y){y.type!=="delete"&&(!((m=y.data)===null||m===void 0)&&m._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${y.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${y.id}")\` to fetch the full record.`);try{a(y)}catch(x){console.error("[Base44 SDK] Subscription callback error:",x)}}}})}}}function LA(e,t){return{async call(n,i,o){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(i!=null&&i.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:a,queryParams:u,...f}=o??{},h={...f,...a&&{path_params:a},...u&&{query_params:u}};return await e.post(`/apps/${t}/integrations/custom/${n}/${i}`,h)}}}function sy(e,t){const n=LA(e,t);return new Proxy({},{get(i,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return o==="custom"?n:new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return async f=>{if(typeof f=="string")throw new Error(`Integration ${u} must receive an object with named parameters, received: ${f}`);let h,p;return f instanceof FormData||f&&Object.values(f).some(m=>m instanceof File)?(h=new FormData,Object.keys(f).forEach(m=>{f[m]instanceof File?h.append(m,f[m],f[m].name):typeof f[m]=="object"&&f[m]!==null?h.append(m,JSON.stringify(f[m])):h.append(m,f[m])}),p="multipart/form-data"):(h=f,p="application/json"),o==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${u}`,h||f,{headers:{"Content-Type":p}}):e.post(`/apps/${t}/integration-endpoints/installable/${o}/integration-endpoints/${u}`,h||f,{headers:{"Content-Type":p}})}}})}})}function DA(){return typeof window>"u"?!1:window!==window.parent}function jA(e,t,n){const a=Math.round(window.screenX+(window.outerWidth-500)/2),u=Math.round(window.screenY+(window.outerHeight-600)/2),f=window.open(e,"base44_auth",`width=500,height=600,left=${a},top=${u},resizable=yes,scrollbars=yes`);if(!f)return;const h=()=>{window.removeEventListener("message",p),clearInterval(m),f.closed||f.close()},p=y=>{var x;if(y.origin!==n||y.source!==f||!(!((x=y.data)===null||x===void 0)&&x.access_token))return;h();const v=new URL(t),{access_token:R,is_new_user:_}=y.data;v.searchParams.set("access_token",R),_!=null&&v.searchParams.set("is_new_user",String(_)),window.location.href=v.toString()},m=setInterval(()=>{f.closed&&h()},500);window.addEventListener("message",p)}function FA(e,t,n,i){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(o){return e.put(`/apps/${n}/entities/User/me`,o)},redirectToLogin(o){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const a=o?new URL(o,window.location.origin).toString():window.location.href,u=`${i.appBaseUrl}/login?from_url=${encodeURIComponent(a)}`;window.location.href=u},loginWithProvider(o,a="/"){const u=new URL(a,window.location.origin).toString(),f=`app_id=${n}&from_url=${encodeURIComponent(u)}`;let h;o==="sso"?h=`/apps/${n}/auth/sso/login`:h=`/apps/auth${o==="google"?"":`/${o}`}/login`;const p=`${i.appBaseUrl}/api${h}?${f}`;if(DA()){const m=`${p}&popup_origin=${encodeURIComponent(window.location.origin)}`;return jA(m,u,window.location.origin)}window.location.href=p},logout(o){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(f){console.error("Failed to remove token from localStorage:",f)}const a=o||window.location.href,u=`${i.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(a)}`;window.location.href=u}},setToken(o,a=!0){if(o&&(e.defaults.headers.common.Authorization=`Bearer ${o}`,t.defaults.headers.common.Authorization=`Bearer ${o}`,a&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",o),window.localStorage.setItem("token",o)}catch(u){console.error("Failed to save token to localStorage:",u)}},async loginViaEmailPassword(o,a,u){var f;try{const h=await e.post(`/apps/${n}/auth/login`,{email:o,password:a,...u&&{turnstile_token:u}}),{access_token:p,user:m}=h;return p&&this.setToken(p),{access_token:p,user:m}}catch(h){throw((f=h.response)===null||f===void 0?void 0:f.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(o,a){return e.post(`/apps/${n}/users/invite-user`,{user_email:o,role:a})},register(o){return e.post(`/apps/${n}/auth/register`,o)},verifyOtp({email:o,otpCode:a}){return e.post(`/apps/${n}/auth/verify-otp`,{email:o,otp_code:a})},resendOtp(o){return e.post(`/apps/${n}/auth/resend-otp`,{email:o})},resetPasswordRequest(o){return e.post(`/apps/${n}/auth/reset-password-request`,{email:o})},resetPassword({resetToken:o,newPassword:a}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:o,new_password:a})},changePassword({userId:o,currentPassword:a,newPassword:u}){return e.post(`/apps/${n}/auth/change-password`,{user_id:o,current_password:a,new_password:u})}}}function MA(e,t){return{async getAccessToken(n){const i=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(i)},async getIdToken(n){const i=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(i)}}}function zA(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var i;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/${n}`);return{accessToken:a.access_token,connectionConfig:(i=a.connection_config)!==null&&i!==void 0?i:null}},async getWorkspaceConnection(n){var i;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/connectors/${n}`);return{accessToken:a.access_token,connectionConfig:(i=a.connection_config)!==null&&i!==void 0?i:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var i;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`);return{accessToken:a.access_token,connectionConfig:(i=a.connection_config)!==null&&i!==void 0?i:null}}}}function UA(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${n}`)}}}function Ci(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:i=!0,removeFromUrl:o=!0}=e;let a=null;if(typeof window<"u"&&window.location)try{const u=new URLSearchParams(window.location.search);if(a=u.get(n),a){if(i&&BA(a,{storageKey:t}),o){u.delete(n);const f=`${window.location.pathname}${u.toString()?`?${u.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,f)}return a}}catch(u){console.error("Error retrieving token from URL:",u)}if(typeof window<"u"&&window.localStorage)try{return a=window.localStorage.getItem(t),a}catch(u){console.error("Error retrieving token from local storage:",u)}return null}function BA(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(i){return console.error("Error saving token to local storage:",i),!1}}function oy(e,t,n){const i=(a,u)=>a?`${String(a).replace(/\/$/,"")}${u}`:u,o=a=>{const u=new Headers;if(n!=null&&n.getAuthHeaders){const f=n.getAuthHeaders();Object.entries(f).forEach(([h,p])=>{p!=null&&u.set(h,String(p))})}return a&&new Headers(a).forEach((f,h)=>{u.set(h,f)}),u};return{async invoke(a,u){if(typeof u=="string")throw new Error(`Function ${a} must receive an object with named parameters, received: ${u}`);let f,h;return u instanceof FormData||u&&Object.values(u).some(p=>p instanceof File)?(f=new FormData,Object.keys(u).forEach(p=>{u[p]instanceof File?f.append(p,u[p],u[p].name):typeof u[p]=="object"&&u[p]!==null?f.append(p,JSON.stringify(u[p])):f.append(p,u[p])}),h="multipart/form-data"):(f=u,h="application/json"),e.post(`/apps/${t}/functions/${a}`,f||u,{headers:{"Content-Type":h}})},async fetch(a,u={}){const h=`/functions${a.startsWith("/")?a:`/${a}`}`,p=o(u.headers),m={...u,headers:p};return await fetch(i(n==null?void 0:n.baseURL,h),m)}}}function ly({axios:e,getSocket:t,appId:n,serverUrl:i,token:o}){const a=`/apps/${n}/agents`,u={},f=()=>e.get(`${a}/conversations`),h=_=>e.get(`${a}/conversations/${_}`);return{getConversations:f,getConversation:h,listConversations:_=>e.get(`${a}/conversations`,{params:_}),createConversation:_=>e.post(`${a}/conversations`,_),addMessage:async(_,E)=>e.post(`${a}/conversations/v2/${_.id}/messages`,E),subscribeToConversation:(_,E)=>{const k=`/agent-conversations/${_}`,P=t(),C=h(_).then(D=>(u[_]=D,D));return P.subscribeToRoom(k,{connect:()=>{},update_model:async({data:D})=>{const V=JSON.parse(D);if(V._message){await C;const O=V._message,Q=u[_];if(Q){const z=Q.messages||[],K=z.findIndex(Z=>Z.id===O.id),G=K!==-1?z.map((Z,re)=>re===K?O:Z):[...z,O];u[_]={...Q,messages:G},E==null||E(u[_])}}}})},getWhatsAppConnectURL:_=>{const E=`${i}/api/apps/${n}/agents/${encodeURIComponent(_)}/whatsapp`,k=o??Ci();return k?`${E}?token=${k}`:E},getTelegramConnectURL:_=>{const E=`${i}/api/apps/${n}/agents/${encodeURIComponent(_)}/telegram`,k=o??Ci();return k?`${E}?token=${k}`:E}}}function ay({serverUrl:e,token:t,appId:n}){return{connection:()=>{var o;return{baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:(o=t??Ci())!==null&&o!==void 0?o:""}}}}function uy(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(i){await e.post(`${n}/log-user-in-app/${i}`)},async fetchLogs(i={}){return await e.get(n,{params:i})},async getStats(i={}){return await e.get(`${n}/stats`,{params:i})}}}function $A(e,t){return{async inviteUser(n,i){if(i!=="user"&&i!=="admin")throw new Error(`Invalid role: "${i}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:i})}}}const Yn=Object.create(null);Yn.open="0";Yn.close="1";Yn.ping="2";Yn.pong="3";Yn.message="4";Yn.upgrade="5";Yn.noop="6";const La=Object.create(null);Object.keys(Yn).forEach(e=>{La[Yn[e]]=e});const Xf={type:"error",data:"parser error"},lw=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",aw=typeof ArrayBuffer=="function",uw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ud=({type:e,data:t},n,i)=>lw&&t instanceof Blob?n?i(t):cy(t,i):aw&&(t instanceof ArrayBuffer||uw(t))?n?i(t):cy(new Blob([t]),i):i(Yn[e]+(t||"")),cy=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function fy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let af;function VA(e,t){if(lw&&e.data instanceof Blob)return e.data.arrayBuffer().then(fy).then(t);if(aw&&(e.data instanceof ArrayBuffer||uw(e.data)))return t(fy(e.data));Ud(e,!1,n=>{af||(af=new TextEncoder),t(af.encode(n))})}const dy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ro=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,i,o=0,a,u,f,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const p=new ArrayBuffer(t),m=new Uint8Array(p);for(i=0;i>4,m[o++]=(u&15)<<4|f>>2,m[o++]=(f&3)<<6|h&63;return p},qA=typeof ArrayBuffer=="function",Bd=(e,t)=>{if(typeof e!="string")return{type:"message",data:cw(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:WA(e.substring(1),t)}:La[n]?e.length>1?{type:La[n],data:e.substring(1)}:{type:La[n]}:Xf},WA=(e,t)=>{if(qA){const n=HA(e);return cw(n,t)}else return{base64:!0,data:e}},cw=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},fw="",QA=(e,t)=>{const n=e.length,i=new Array(n);let o=0;e.forEach((a,u)=>{Ud(a,!1,f=>{i[u]=f,++o===n&&t(i.join(fw))})})},KA=(e,t)=>{const n=e.split(fw),i=[];for(let o=0;o{const i=n.length;let o;if(i<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,i);else if(i<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,i)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(i))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let uf;function ka(e){return e.reduce((t,n)=>t+n.length,0)}function Sa(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let i=0;for(let o=0;oMath.pow(2,21)-1){f.enqueue(Xf);break}o=m*Math.pow(2,32)+p.getUint32(4),i=3}else{if(ka(n)e){f.enqueue(Xf);break}}}})}const dw=4;function ct(e){if(e)return XA(e)}function XA(e){for(var t in ct.prototype)e[t]=ct.prototype[t];return e}ct.prototype.on=ct.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ct.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ct.prototype.off=ct.prototype.removeListener=ct.prototype.removeAllListeners=ct.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var i,o=0;oPromise.resolve().then(t):(t,n)=>n(t,0),bn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),JA="arraybuffer";function hw(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const ZA=bn.setTimeout,eT=bn.clearTimeout;function tu(e,t){t.useNativeTimers?(e.setTimeoutFn=ZA.bind(bn),e.clearTimeoutFn=eT.bind(bn)):(e.setTimeoutFn=bn.setTimeout.bind(bn),e.clearTimeoutFn=bn.clearTimeout.bind(bn))}const tT=1.33;function nT(e){return typeof e=="string"?rT(e):Math.ceil((e.byteLength||e.size)*tT)}function rT(e){let t=0,n=0;for(let i=0,o=e.length;i=57344?n+=3:(i++,n+=4);return n}function pw(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function iT(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function sT(e){let t={},n=e.split("&");for(let i=0,o=n.length;i{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};KA(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,QA(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=pw()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let mw=!1;try{mw=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const aT=mw;function uT(){}class cT extends lT{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let i=location.port;i||(i=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class Kn extends ct{constructor(t,n,i){super(),this.createRequest=t,tu(this,i),this._opts=i,this._method=i.method||"GET",this._uri=n,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const n=hw(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(n);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&i.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var o;i.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Kn.requestsCount++,Kn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=uT,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Kn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Kn.requestsCount=0;Kn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hy);else if(typeof addEventListener=="function"){const e="onpagehide"in bn?"pagehide":"unload";addEventListener(e,hy,!1)}}function hy(){for(let e in Kn.requests)Kn.requests.hasOwnProperty(e)&&Kn.requests[e].abort()}const fT=(function(){const e=gw({xdomain:!1});return e&&e.responseType!==null})();class dT extends cT{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=fT&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Kn(gw,this.uri(),t)}}function gw(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||aT))return new XMLHttpRequest}catch{}if(!t)try{return new bn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const yw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class hT extends $d{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,i=yw?{}:hw(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{try{this.doWrite(i,a)}catch{}o&&eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=pw()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const cf=bn.WebSocket||bn.MozWebSocket;class pT extends hT{createSocket(t,n,i){return yw?new cf(t,n,i):n?new cf(t,n):new cf(t)}doWrite(t,n){this.ws.send(n)}}class mT extends $d{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=GA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),o=YA();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{i.read().then(({done:f,value:h})=>{f||(this.onPacket(h),a())}).catch(f=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n{o&&eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const gT={websocket:pT,webtransport:mT,polling:dT},yT=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vT=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Jf(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=yT.exec(e||""),a={},u=14;for(;u--;)a[vT[u]]=o[u]||"";return n!=-1&&i!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=xT(a,a.path),a.queryKey=wT(a,a.query),a}function xT(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function wT(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,o,a){o&&(n[o]=a)}),n}const Zf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Da=[];Zf&&addEventListener("offline",()=>{Da.forEach(e=>e())},!1);class Qr extends ct{constructor(t,n){if(super(),this.binaryType=JA,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const i=Jf(t);n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)}else n.host&&(n.hostname=Jf(n.host).host);tu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(i=>{const o=i.prototype.name;this.transports.push(o),this._transportsByName[o]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=sT(this.opts.query)),Zf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Da.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=dw,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Qr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Qr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i0&&n>this._maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,eu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,i){return this._sendPacket("message",t,n,i),this}send(t,n,i){return this._sendPacket("message",t,n,i),this}_sendPacket(t,n,i,o){if(typeof n=="function"&&(o=n,n=void 0),typeof i=="function"&&(o=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const a={type:t,data:n,options:i};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(Qr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Zf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=Da.indexOf(this._offlineEventListener);i!==-1&&Da.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Qr.protocol=dw;class bT extends Qr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!i)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Qr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=n.name,this.emitReserved("upgradeError",x)}}))};function a(){i||(i=!0,m(),n.close(),n=null)}const u=y=>{const x=new Error("probe error: "+y);x.transport=n.name,a(),this.emitReserved("upgradeError",x)};function f(){u("transport closed")}function h(){u("socket closed")}function p(y){n&&y.name!==n.name&&a()}const m=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",f),this.off("close",h),this.off("upgrading",p)};n.once("open",o),n.once("error",u),n.once("close",f),this.once("close",h),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let i=0;igT[a]).filter(a=>!!a)),super(i?o:t,o)}};function ST(e,t="",n){let i=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),i=Jf(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const a=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+a+":"+i.port+t,i.href=i.protocol+"://"+a+(n&&n.port===i.port?"":":"+i.port),i}const ET=typeof ArrayBuffer=="function",_T=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,vw=Object.prototype.toString,CT=typeof Blob=="function"||typeof Blob<"u"&&vw.call(Blob)==="[object BlobConstructor]",AT=typeof File=="function"||typeof File<"u"&&vw.call(File)==="[object FileConstructor]";function Vd(e){return ET&&(e instanceof ArrayBuffer||_T(e))||CT&&e instanceof Blob||AT&&e instanceof File}function ja(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n=0&&e.numthis.opts.maxAttachments)throw new Error("too many attachments");i.attachments=f}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););i.nsp=t.substring(a,n)}else i.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}i.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Hd.isPayloadValid(i.type,a))i.data=a;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Me.CONNECT:return py(n);case Me.DISCONNECT:return n===void 0;case Me.CONNECT_ERROR:return typeof n=="string"||py(n);case Me.EVENT:case Me.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&PT.indexOf(n[0])===-1);case Me.ACK:case Me.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class OT{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=RT(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const IT=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function py(e){return Object.prototype.toString.call(e)==="[object Object]"}const LT=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Hd,Encoder:NT,get PacketType(){return Me}},Symbol.toStringTag,{value:"Module"}));function Ln(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const DT=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class xw extends ct{constructor(t,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Ln(t,"open",this.onopen.bind(this)),Ln(t,"packet",this.onpacket.bind(this)),Ln(t,"error",this.onerror.bind(this)),Ln(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var i,o,a;if(DT.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Me.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,y=n.pop();this._registerAckCallback(m,y),u.id=m}const f=(o=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||o===void 0?void 0:o.writable,h=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!f||(h?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var i;const o=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let f=0;f{this.io.clearTimeoutFn(a),n.apply(this,f)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((i,o)=>{const a=(u,f)=>u?o(u):i(f);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Me.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Me.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Me.EVENT:case Me.BINARY_EVENT:this.onevent(t);break;case Me.ACK:case Me.BINARY_ACK:this.onack(t);break;case Me.DISCONNECT:this.ondisconnect();break;case Me.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let i=!1;return function(...o){i||(i=!0,n.packet({type:Me.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Me.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ps.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Ps.prototype.reset=function(){this.attempts=0};Ps.prototype.setMin=function(e){this.ms=e};Ps.prototype.setMax=function(e){this.max=e};Ps.prototype.setJitter=function(e){this.jitter=e};class nd extends ct{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,tu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Ps({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||LT;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new kT(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=Ln(n,"open",function(){i.onopen(),t&&t()}),a=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),t?t(f):this.maybeReconnectOnOpen()},u=Ln(n,"error",a);if(this._timeout!==!1){const f=this._timeout,h=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},f);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ln(t,"ping",this.onping.bind(this)),Ln(t,"data",this.ondata.bind(this)),Ln(t,"error",this.onerror.bind(this)),Ln(t,"close",this.onclose.bind(this)),Ln(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){eu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new xw(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;it()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const wo={};function Fa(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=ST(e,t.path||"/socket.io"),i=n.source,o=n.id,a=n.path,u=wo[o]&&a in wo[o].nsps,f=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let h;return f?h=new nd(i,t):(wo[o]||(wo[o]=new nd(i,t)),h=wo[o]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(Fa,{Manager:nd,Socket:xw,io:Fa,connect:Fa});const jT=250;function my(e,t){var n;const i=(n=e.token)!==null&&n!==void 0?n:Ci(),o={app_id:e.appId,token:i};i||(o.anonymous_id=zd());const a=Fa(e.serverUrl,{path:e.mountPath,transports:e.transports,query:o});return a.on("connect",async()=>{var u;return console.log("connect",a.id),(u=t.connect)===null||u===void 0?void 0:u.call(t)}),a.on("update_model",async u=>{var f;return(f=t.update_model)===null||f===void 0?void 0:f.call(t,u)}),a.on("error",async u=>{var f;return(f=t.error)===null||f===void 0?void 0:f.call(t,u)}),a.on("connect_error",async u=>{var f;return console.error("connect_error",u),(f=t.error)===null||f===void 0?void 0:f.call(t,u)}),a}function FT({config:e}){let t={...e};const n={},i={},o={connect:async()=>{const k=[];Object.keys(n).forEach(P=>{const C=x(P);C.length!==0&&(p(P),C.forEach(({connect:D})=>{const V=async()=>D==null?void 0:D();k.push(V())}))}),await Promise.all(k)},update_model:async k=>{const C=x(k.room).map(D=>{var V;return(V=D.update_model)===null||V===void 0?void 0:V.call(D,k)});await Promise.all(C)},error:async k=>{console.error("error",k);const P=Object.values(n).flat().map(C=>{var D;return(D=C.error)===null||D===void 0?void 0:D.call(C,k)});await Promise.all(P)}};let a=my(e,o);function u(){f()}function f(){R(),a&&a.disconnect()}function h(k){u(),t={...t,...k},a=my(t,o)}function p(k){a.emit("join",k)}function m(k){a.emit("leave",k)}async function y(k,P){var C;const D=JSON.stringify(P);return(C=o.update_model)===null||C===void 0?void 0:C.call(o,{room:k,data:D})}function x(k){var P;return(P=n[k])!==null&&P!==void 0?P:[]}function v(k){const P=i[k];P&&(clearTimeout(P),delete i[k])}function R(){Object.keys(i).forEach(k=>{var P,C;clearTimeout(i[k]),delete i[k],((C=(P=n[k])===null||P===void 0?void 0:P.length)!==null&&C!==void 0?C:0)===0&&delete n[k]})}function _(k){v(k),i[k]=setTimeout(()=>{var P,C;delete i[k],!(((C=(P=n[k])===null||P===void 0?void 0:P.length)!==null&&C!==void 0?C:0)>0)&&(m(k),delete n[k])},jT)}return{socket:a,subscribeToRoom:(k,P)=>{n[k]?v(k):(p(k),n[k]=[]),n[k].push(P);let C=!1;return()=>{var D,V;C||(C=!0,n[k]=(V=(D=n[k])===null||D===void 0?void 0:D.filter(O=>O!==P))!==null&&V!==void 0?V:[],n[k].length===0&&_(k))}},updateConfig:h,updateModel:y,disconnect:f}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var ww=class extends Event{constructor(t,n){super("error",n);$e(this,"message");$e(this,"error");this.message=t.message,this.error=t}},bw=class extends Event{constructor(t=1e3,n="",i){super("close",i);$e(this,"code");$e(this,"reason");$e(this,"wasClean",!0);this.code=t,this.reason=n}},ff={Event,ErrorEvent:ww,CloseEvent:bw};function MT(e,t){if(!e)throw new Error(t)}function zT(e){return new e.constructor(e.type,e)}function UT(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new bw(e.code||1999,e.reason||"unknown reason",e):"error"in e?new ww(e.error,e):new Event(e.type,e)}var mv,BT=typeof process<"u"&&typeof((mv=process.versions)==null?void 0:mv.node)<"u"&&typeof document>"u",Ea=BT?UT:zT,fi={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},gy=!1,$T=class di extends EventTarget{constructor(n,i,o={}){super();$e(this,"_ws");$e(this,"_retryCount",-1);$e(this,"_uptimeTimeout");$e(this,"_connectTimeout");$e(this,"_shouldReconnect",!0);$e(this,"_connectLock",!1);$e(this,"_binaryType","blob");$e(this,"_closeCalled",!1);$e(this,"_messageQueue",[]);$e(this,"_url");$e(this,"_protocols");$e(this,"_options");$e(this,"onclose",null);$e(this,"onerror",null);$e(this,"onmessage",null);$e(this,"onopen",null);$e(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:i=fi.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),i),MT(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(o=>{var a;return(a=this._ws)==null?void 0:a.send(o)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(Ea(n))});$e(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(Ea(n))});$e(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(Ea(n)),this._connect()});$e(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(Ea(n))});this._url=n,this._protocols=i,this._options=o,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return di.CONNECTING}get OPEN(){return di.OPEN}get CLOSING(){return di.CLOSING}get CLOSED(){return di.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((i,o)=>(typeof o=="string"?i+=o.length:o instanceof Blob?i+=o.size:i+=o.byteLength,i),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?di.CLOSED:di.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,i){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,i)}reconnect(n,i){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,i),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:i=fi.maxEnqueuedMessages}=this._options;this._messageQueue.length",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=fi.reconnectionDelayGrowFactor,minReconnectionDelay:i=fi.minReconnectionDelay,maxReconnectionDelay:o=fi.maxReconnectionDelay}=this._options;let a=0;return this._retryCount>0&&(a=i*Math.pow(n,this._retryCount-1),a>o&&(a=o)),this._debug("next delay",a),a}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const i=n();if(!i)return Promise.resolve(null);if(typeof i=="string"||Array.isArray(i))return Promise.resolve(i);if(i.then)return i}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const i=n();if(typeof i=="string")return Promise.resolve(i);if(i.then)return i}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=fi.maxRetries,connectionTimeout:i=fi.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([o,a])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!gy&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),gy=!0);const u=this._options.WebSocket||WebSocket;this._debug("connect",{url:o,protocols:a}),this._ws=a?new u(o,a):new u(o),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),i)}).catch(o=>{this._connectLock=!1,this._handleError(new ff.ErrorEvent(Error(o.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new ff.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,i){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,i),this._handleClose(new ff.CloseEvent(n,i,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var VT=e=>e[1]!==null&&e[1]!==void 0;function HT(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let i=Math.random()*16;return e>0?(i=(e+i)%16|0,e=Math.floor(e/16)):(i=(t+i)%16|0,t=Math.floor(t/16)),(n==="x"?i:i&3|8).toString(16)})}function kw(e,t,n={}){const{host:i,path:o,protocol:a,room:u,party:f,query:h}=e;let p=i.replace(/^(http|https|ws|wss):\/\//,"");if(p.endsWith("/")&&(p=p.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");const m=f??"main",y=o?`/${o}`:"",x=a||(p.startsWith("localhost:")||p.startsWith("127.0.0.1:")||p.startsWith("192.168.")||p.startsWith("10.")||p.startsWith("172.")&&p.split(".")[1]>="16"&&p.split(".")[1]<="31"||p.startsWith("[::ffff:7f00:1]:")?t:t+"s"),v=`${x}://${p}/${f?`parties/${f}`:"party"}/${u}${y}`,R=(E={})=>`${v}?${new URLSearchParams([...Object.entries(n),...Object.entries(E).filter(VT)])}`,_=typeof h=="function"?async()=>R(await h()):R(h);return{host:p,path:y,room:u,name:m,protocol:x,partyUrl:v,urlProvider:_}}var qT=class extends $T{constructor(t){const n=yy(t);super(n.urlProvider,n.protocols,n.socketOptions);$e(this,"_pk");$e(this,"_pkurl");$e(this,"name");$e(this,"room");$e(this,"host");$e(this,"path");this.partySocketOptions=t,this.setWSProperties(n)}updateProperties(t){const n=yy({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=n.urlProvider,this._protocols=n.protocols,this._options=n.socketOptions,this.setWSProperties(n)}setWSProperties(t){const{_pk:n,_pkurl:i,name:o,room:a,host:u,path:f}=t;this._pk=n,this._pkurl=i,this.name=o,this.room=a,this.host=u,this.path=f}reconnect(t,n){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,n)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,n){const i=kw(t,"http"),o=typeof i.urlProvider=="string"?i.urlProvider:await i.urlProvider();return(t.fetch??fetch)(o,n)}};function yy(e){const{id:t,host:n,path:i,party:o,room:a,protocol:u,query:f,protocols:h,...p}=e,m=t||HT(),y=kw(e,"ws",{_pk:m});return{_pk:m,_pkurl:y.partyUrl,name:y.name,room:y.room,host:y.host,path:y.path,protocols:h,socketOptions:p,urlProvider:y.urlProvider}}const WT=1e3,QT=3e3;class KT{constructor(t,n,i,o,a){var u;this.onClose=a,this.listeners=new Set,this.heartbeat=null,this.id=(u=o==null?void 0:o.id)!==null&&u!==void 0?u:crypto.randomUUID();const f=new qT({host:i.host,party:t,room:n,id:this.id,query:()=>{const m=i.getAuthToken();return{app_id:i.appId,handler:t,...m?{token:m}:{},...i.functionsVersion?{fv:i.functionsVersion}:{}}}});this.ws=f;let h=Date.now();const p=()=>{h=Date.now()};f.addEventListener("open",p),f.addEventListener("message",m=>{p();let y;try{y=JSON.parse(m.data)}catch{return}if((y&&typeof y=="object"?y.type:void 0)!=="__pong")for(const v of this.listeners)v(y)}),this.heartbeat=setInterval(()=>{if(Date.now()-h>QT){p(),f.reconnect();return}try{f.send(JSON.stringify({type:"__ping"}))}catch{}},WT)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function YT(e,t,n,i){let o=null;return{connect(a){if(o)return o;const u=new KT(e,t,n,a,()=>{i.delete(u),o===u&&(o=null)});return o=u,i.add(u),u}}}function GT(e,t){return e&&!e.startsWith("/")?e:t??e}function XT(e){const t=new Set;return{module:new Proxy({},{get(i,o){if(!(typeof o!="string"||o==="then"))return a=>YT(o,a,e,t)}}),closeAll:()=>{for(const i of[...t])i.close()}}}function JT(e){var t,n,i;const{serverUrl:o="https://base44.app",appId:a,token:u,serviceToken:f,requiresAuth:h=!1,appBaseUrl:p,options:m,functionsVersion:y,headers:x}=e,v=typeof p=="string"?p:"",R={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:a,token:u};let _=null;const E=()=>(_||(_=FT({config:R})),_),k={...x,"X-App-Id":String(a)},P=y?{...k,"Base44-Functions-Version":y}:k,C=To({baseURL:`${o}/api`,headers:k,token:u,onError:m==null?void 0:m.onError}),D=To({baseURL:`${o}/api`,headers:P,token:u,interceptResponses:!1,onError:m==null?void 0:m.onError}),V={...k,...u?{"on-behalf-of":`Bearer ${u}`}:{}},O=To({baseURL:`${o}/api`,headers:V,token:f,onError:m==null?void 0:m.onError}),Q=To({baseURL:`${o}/api`,headers:P,token:f,interceptResponses:!1}),z=FA(C,D,a,{appBaseUrl:v});if(typeof window<"u"){const ue=u||Ci();ue&&z.setToken(ue)}const K=XT({appId:a,host:GT(o,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:y,getAuthToken:()=>u||Ci()}),G={entities:iy({axios:C,appId:a,getSocket:E}),integrations:sy(C,a),connectors:UA(C,a),auth:z,functions:oy(D,a,{getAuthHeaders:()=>{const ue={},W=u||Ci();return W&&(ue.Authorization=`Bearer ${W}`),ue},baseURL:(n=D.defaults)===null||n===void 0?void 0:n.baseURL}),agents:ly({axios:C,getSocket:E,appId:a,serverUrl:o,token:u}),aiGateway:ay({serverUrl:o,token:u,appId:a}),appLogs:uy(C,a),users:$A(C,a),analytics:SA({axiosClient:C,serverUrl:o,appId:a,userAuthModule:z}),actors:K.module,cleanup:()=>{G.analytics.cleanup(),K.closeAll(),_&&_.disconnect()}},Z={entities:iy({axios:O,appId:a,getSocket:E}),integrations:sy(O,a),sso:MA(O,a),connectors:zA(O,a),functions:oy(Q,a,{getAuthHeaders:()=>{const ue={};return f&&(ue.Authorization=`Bearer ${f}`),ue},baseURL:(i=Q.defaults)===null||i===void 0?void 0:i.baseURL}),agents:ly({axios:O,getSocket:E,appId:a,serverUrl:o,token:u}),aiGateway:ay({serverUrl:o,token:f,appId:a}),appLogs:uy(O,a),cleanup:()=>{_&&_.disconnect()}};return h&&typeof window<"u"&&setTimeout(async()=>{try{await G.auth.isAuthenticated()||G.auth.redirectToLogin(window.location.href)}catch(ue){console.error("Authentication check failed:",ue),G.auth.redirectToLogin(window.location.href)}},0),{...G,setToken(ue){G.auth.setToken(ue),_&&_.updateConfig({token:ue}),R.token=ue},getConfig(){return{serverUrl:o,appId:a,requiresAuth:h}},get asServiceRole(){if(!f)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Z}}}const Sw=typeof window>"u",ZT=Sw?{localStorage:new Map}:window,Oo=ZT.localStorage,eR=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),ss=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(Sw)return t;const i=`base44_${eR(e)}`,o=new URLSearchParams(window.location.search),a=o.get(e);if(n){o.delete(e);const f=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,f)}if(a)return Oo.setItem(i,a),a;if(t)return Oo.setItem(i,t),t;const u=Oo.getItem(i);return u||null},tR=()=>(ss("clear_access_token")==="true"&&(Oo.removeItem("base44_access_token"),Oo.removeItem("token")),{appId:ss("app_id",{defaultValue:"6a7b5eaa4d72530c897de217"}),token:ss("access_token",{removeFromUrl:!0}),fromUrl:ss("from_url",{defaultValue:window.location.href}),functionsVersion:ss("functions_version",{defaultValue:"prod"}),appBaseUrl:ss("app_base_url",{defaultValue:void 0})}),Po={...tR()},{appId:nR,token:rR,functionsVersion:iR,appBaseUrl:sR}=Po,mi=JT({appId:nR,token:rR,functionsVersion:iR,serverUrl:"",requiresAuth:!1,appBaseUrl:sR});function oR({}){var o;const t=Nd().pathname.substring(1),{data:n,isFetched:i}=wE({queryKey:["user"],queryFn:async()=>{try{return{user:await mi.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return w.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:w.jsx("div",{className:"max-w-md w-full",children:w.jsxs("div",{className:"text-center space-y-6",children:[w.jsxs("div",{className:"space-y-2",children:[w.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),w.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),w.jsxs("div",{className:"space-y-3",children:[w.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),w.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",w.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),i&&n.isAuthenticated&&((o=n.user)==null?void 0:o.role)==="admin"&&w.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:w.jsxs("div",{className:"flex items-start space-x-3",children:[w.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:w.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),w.jsxs("div",{className:"text-left space-y-1",children:[w.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),w.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),w.jsx("div",{className:"pt-6",children:w.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[w.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Ew=N.createContext(),lR=({children:e})=>{const[t,n]=N.useState(null),[i,o]=N.useState(!1),[a,u]=N.useState(!0),[f,h]=N.useState(!0),[p,m]=N.useState(null),[y,x]=N.useState(!1),[v,R]=N.useState(null);N.useEffect(()=>{_()},[]);const _=async()=>{var C,D;try{h(!0),m(null);const V=To({baseURL:"/api/apps/public",headers:{"X-App-Id":Po.appId},token:Po.token,interceptResponses:!0});try{const O=await V.get(`/prod/public-settings/by-id/${Po.appId}`);R(O),Po.token?await E():(u(!1),o(!1),x(!0)),h(!1)}catch(O){if(console.error("App state check failed:",O),O.status===403&&((D=(C=O.data)==null?void 0:C.extra_data)!=null&&D.reason)){const Q=O.data.extra_data.reason;m(Q==="auth_required"?{type:"auth_required",message:"Authentication required"}:Q==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:Q,message:O.message})}else m({type:"unknown",message:O.message||"Failed to load app"});h(!1),u(!1)}}catch(V){console.error("Unexpected error:",V),m({type:"unknown",message:V.message||"An unexpected error occurred"}),h(!1),u(!1)}},E=async()=>{try{u(!0);const C=await mi.auth.me();n(C),o(!0),u(!1),x(!0)}catch(C){console.error("User auth check failed:",C),u(!1),o(!1),x(!0),(C.status===401||C.status===403)&&m({type:"auth_required",message:"Authentication required"})}},k=(C=!0)=>{n(null),o(!1),C?mi.auth.logout(window.location.href):mi.auth.logout()},P=()=>{mi.auth.redirectToLogin(window.location.href)};return w.jsx(Ew.Provider,{value:{user:t,isAuthenticated:i,isLoadingAuth:a,isLoadingPublicSettings:f,authError:p,appPublicSettings:v,authChecked:y,logout:k,navigateToLogin:P,checkUserAuth:E,checkAppState:_},children:e})},aR=()=>{const e=N.useContext(Ew);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},uR=()=>w.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:w.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:w.jsxs("div",{className:"text-center",children:[w.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:w.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),w.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),w.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[w.jsx("p",{children:"If you believe this is an error, you can:"}),w.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[w.jsx("li",{children:"Verify you are logged in with the correct account"}),w.jsx("li",{children:"Contact the app administrator for access"}),w.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),cR=e=>{const t=e.slice(1);try{return decodeURIComponent(t)}catch{return t}};function fR(){const{pathname:e,hash:t}=Nd(),n=WE();return N.useEffect(()=>{if(n!=="POP"){if(t){const i=cR(t),o=window.setTimeout(()=>{var a;(a=document.getElementById(i))==null||a.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(o)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[e,t,n]),null}const vy=[{label:"About",path:"/about"},{label:"Our Business",path:"/our-business"},{label:"Our Portfolio",path:"/portfolio"},{label:"Sustainability",path:"/sustainability"},{label:"News & Media",path:"/news-media/press-releases",active:!0},{label:"Contact",path:"/contact"}];function Ma(){const[e,t]=N.useState(!1);return w.jsxs("header",{className:"sticky top-0 z-50 bg-[#F9F8F6]/95 backdrop-blur-sm border-b border-[#E4E4E4]",children:[w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8",children:w.jsxs("div",{className:"flex items-center justify-between h-[72px]",children:[w.jsxs("a",{href:"/",className:"flex items-center gap-2 al-focus-ring","aria-label":"Alrazah home",children:[w.jsx("span",{className:"font-serif-al text-[26px] font-semibold tracking-[0.06em] text-[#0A0A0A]",children:"ALRAZAH"}),w.jsx("span",{className:"hidden sm:inline-block w-[2px] h-5 bg-[#8D0034]","aria-hidden":"true"})]}),w.jsx("nav",{className:"hidden lg:flex items-center gap-8","aria-label":"Primary",children:vy.map(n=>w.jsxs("a",{href:n.path,className:"relative text-[13px] font-medium uppercase tracking-[0.08em] text-[#0A0A0A] hover:text-[#8D0034] transition-colors duration-200 py-2 al-focus-ring",children:[n.label,n.active&&w.jsx("span",{className:"absolute -bottom-px left-0 right-0 h-[2px] bg-[#8D0034]","aria-hidden":"true"})]},n.label))}),w.jsxs("div",{className:"flex items-center gap-4",children:[w.jsx("button",{className:"p-2 text-[#0A0A0A] hover:text-[#8D0034] transition-colors al-focus-ring","aria-label":"Search",children:w.jsx(Sd,{size:18,strokeWidth:1.6})}),w.jsxs("div",{className:"hidden md:flex items-center gap-1 text-[12px] font-medium tracking-[0.06em]",children:[w.jsx("button",{className:"text-[#8D0034] font-semibold al-focus-ring px-1",children:"EN"}),w.jsx("span",{className:"text-[#4A4A4A]",children:"|"}),w.jsx("button",{className:"text-[#4A4A4A] hover:text-[#0A0A0A] al-focus-ring px-1",children:"العربية"})]}),w.jsx("button",{className:"lg:hidden p-2 text-[#0A0A0A] al-focus-ring",onClick:()=>t(!e),"aria-label":"Toggle menu","aria-expanded":e,children:e?w.jsx(Fo,{size:20,strokeWidth:1.6}):w.jsx(Mk,{size:20,strokeWidth:1.6})})]})]})}),e&&w.jsx("nav",{className:"lg:hidden border-t border-[#E4E4E4] bg-[#F9F8F6]","aria-label":"Mobile",children:w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 py-4 flex flex-col",children:vy.map(n=>w.jsx("a",{href:n.path,className:`py-3 text-[14px] font-medium uppercase tracking-[0.08em] border-b border-[#E4E4E4] ${n.active?"text-[#8D0034]":"text-[#0A0A0A]"}`,children:n.label},n.label))})})]})}const dR=[{title:"ABOUT",links:["Overview","Chairman's Message","Governance","Sustainability","Our Approach"]},{title:"OUR BUSINESS",links:["Real Estate","Logistics & Industrial","Asset Management","Project Management"]},{title:"PORTFOLIO",links:["Overview","Projects","Completed","Under Development","Pipeline"]},{title:"NEWS & MEDIA",links:["Press Releases"]},{title:"CONTACT",links:["Contact","Headquarters","General Enquiries"]}];function rd(){return w.jsx("footer",{className:"bg-[#650026] text-white",children:w.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-16 md:py-20",children:[w.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-10 md:gap-8",children:[w.jsxs("div",{className:"col-span-2 md:col-span-3 lg:col-span-1",children:[w.jsx("div",{className:"font-serif-al text-[24px] font-semibold tracking-[0.06em] mb-4",children:"ALRAZAH"}),w.jsx("p",{className:"text-[14px] leading-[1.7] text-white/75 max-w-[260px]",children:"A Qatar-based diversified holding company building enduring value across real estate, logistics, industrial and asset management."})]}),dR.map(e=>w.jsxs("div",{children:[w.jsx("h3",{className:"text-[12px] font-semibold uppercase tracking-[0.14em] text-white/60 mb-4",children:e.title}),w.jsx("ul",{className:"space-y-2.5",children:e.links.map(t=>w.jsx("li",{children:w.jsx("a",{href:"#",className:"text-[13px] text-white/85 hover:text-white transition-colors duration-200 al-focus-ring",children:t})},t))})]},e.title))]}),w.jsxs("div",{className:"mt-16 pt-8 border-t border-white/15 flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[w.jsx("div",{className:"flex flex-wrap gap-x-6 gap-y-2",children:["Privacy Policy","Terms of Use","Cookie Policy","Disclaimer"].map(e=>w.jsx("a",{href:"#",className:"text-[12px] text-white/70 hover:text-white transition-colors al-focus-ring",children:e},e))}),w.jsx("p",{className:"text-[12px] text-white/60",children:"© 2026 Alrazah. All rights reserved."})]})]})})}function id({items:e}){return w.jsx("nav",{"aria-label":"Breadcrumb",className:"mx-auto max-w-[1280px] px-5 md:px-8 py-4",children:w.jsx("ol",{className:"flex items-center flex-wrap gap-1.5 text-[12px] font-medium tracking-[0.02em]",children:e.map((t,n)=>{const i=n===e.length-1;return w.jsxs("li",{className:"flex items-center gap-1.5",children:[t.path&&!i?w.jsx("a",{href:t.path,className:"text-[#4A4A4A] hover:text-[#8D0034] transition-colors al-focus-ring",children:t.label}):w.jsx("span",{className:i?"text-[#8D0034] font-semibold":"text-[#4A4A4A]",children:t.label}),!i&&w.jsx(Ak,{size:13,className:"text-[#9A9A9A]",strokeWidth:1.5,"aria-hidden":"true"})]},t.label)})})})}const _w=["Corporate","Investment","Business Development","Partnerships","Sustainability","Leadership","Projects","Financial","Other"],bo=10;function Cw(e){const t=new Date(e);return`${String(t.getUTCDate()).padStart(2,"0")} ${["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"][t.getUTCMonth()]} ${t.getUTCFullYear()}`}function xy(){const[e,t]=N.useState([]),[n,i]=N.useState(!0),[o,a]=N.useState(""),[u,f]=N.useState("All Years"),[h,p]=N.useState("All Categories"),[m,y]=N.useState("latest"),[x,v]=N.useState(1),[R,_]=N.useState(!1);N.useEffect(()=>{const z=new URLSearchParams(window.location.search);z.get("year")&&f(z.get("year")),z.get("category")&&p(z.get("category")),z.get("q")&&a(z.get("q"))},[]),N.useEffect(()=>{(async()=>{try{const K=(await mi.entities.PressRelease.list("-publication_date",200)).filter(G=>G.status==="Published"||!G.status);t(K)}catch{t([])}finally{i(!1)}})()},[]);const E=N.useMemo(()=>Array.from(new Set(e.map(K=>new Date(K.publication_date).getUTCFullYear()))).sort((K,G)=>G-K),[e]),k=N.useMemo(()=>{let z=[...e];if(u!=="All Years"&&(z=z.filter(K=>String(new Date(K.publication_date).getUTCFullYear())===u)),h!=="All Categories"&&(z=z.filter(K=>K.category===h)),o.trim()){const K=o.toLowerCase();z=z.filter(G=>G.title.toLowerCase().includes(K)||(G.excerpt||"").toLowerCase().includes(K))}return z.sort((K,G)=>{const Z=new Date(K.publication_date).getTime(),re=new Date(G.publication_date).getTime();return m==="latest"?re-Z:Z-re}),z},[e,u,h,o,m]);N.useEffect(()=>{const z=new URLSearchParams;u!=="All Years"&&z.set("year",u),h!=="All Categories"&&z.set("category",h),o.trim()&&z.set("q",o.trim());const K=z.toString(),G=window.location.pathname+(K?`?${K}`:"");window.history.replaceState({},"",G),v(1)},[u,h,o]);const P=Math.max(1,Math.ceil(k.length/bo)),C=Math.min(x,P),D=k.slice((C-1)*bo,C*bo),V=N.useMemo(()=>e.find(z=>z.featured)||null,[e]),O=[];u!=="All Years"&&O.push({key:"year",label:u}),h!=="All Categories"&&O.push({key:"category",label:h}),o.trim()&&O.push({key:"q",label:`"${o}"`});const Q=()=>{f("All Years"),p("All Categories"),a("")};return w.jsxs("div",{className:"min-h-screen bg-[#F9F8F6]",children:[w.jsx(Ma,{}),w.jsx(id,{items:[{label:"Home",path:"/"},{label:"News & Media",path:"/news-media/press-releases"},{label:"Press Releases"}]}),w.jsx("section",{className:"border-b border-[#E4E4E4]",children:w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8",children:w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[65%_35%] min-h-[320px]",children:[w.jsxs("div",{className:"py-12 md:py-16 pr-0 lg:pr-12 flex flex-col justify-center",children:[w.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-[0.14em] text-[#8D0034] mb-5",children:"News & Media"}),w.jsx("h1",{className:"font-serif-al text-[40px] md:text-[60px] leading-[1.04] font-medium tracking-[-0.02em] text-[#0A0A0A]",children:"Press Releases"}),w.jsx("p",{className:"mt-6 text-[17px] md:text-[18px] leading-[1.6] text-[#4A4A4A] max-w-[560px]",children:"Official announcements and corporate communications from Alrazah. Access the latest developments, strategic updates and institutional announcements issued by the Group."})]}),w.jsxs("div",{className:"bg-[#8D0034] relative overflow-hidden min-h-[160px] flex items-center justify-center",children:[w.jsxs("div",{className:"absolute inset-0 opacity-[0.07] flex items-center justify-center","aria-hidden":"true",children:[w.jsx("div",{className:"w-px h-full bg-white absolute left-1/4"}),w.jsx("div",{className:"w-px h-full bg-white absolute left-1/2"}),w.jsx("div",{className:"w-px h-full bg-white absolute left-3/4"}),w.jsx("div",{className:"w-full h-px bg-white absolute top-1/4"}),w.jsx("div",{className:"w-full h-px bg-white absolute top-1/2"}),w.jsx("div",{className:"w-full h-px bg-white absolute top-3/4"})]}),w.jsxs("div",{className:"relative text-center px-6",children:[w.jsx("div",{className:"font-serif-al text-white text-[22px] md:text-[26px] font-medium tracking-[0.08em] leading-[1.15]",children:"ALRAZAH"}),w.jsx("div",{className:"text-white/80 text-[11px] uppercase tracking-[0.3em] mt-2",children:"Corporate Communications"})]})]})]})})}),w.jsx("section",{className:"border-b border-[#E4E4E4]",children:w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-16 md:py-20",children:w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[260px_1fr] gap-8 lg:gap-16",children:[w.jsxs("div",{className:"flex items-start gap-3",children:[w.jsx("span",{className:"w-[2px] h-7 bg-[#8D0034] mt-1 shrink-0"}),w.jsxs("p",{className:"text-[12px] font-semibold uppercase tracking-[0.14em] text-[#8D0034]",children:["Corporate",w.jsx("br",{}),"Communications"]})]}),w.jsxs("div",{className:"max-w-[760px]",children:[w.jsx("h2",{className:"font-serif-al text-[26px] md:text-[30px] font-medium text-[#0A0A0A] mb-6 leading-[1.2]",children:"A formal record of Alrazah's corporate developments"}),w.jsx("p",{className:"text-[17px] leading-[1.7] text-[#4A4A4A] mb-4",children:"Alrazah communicates significant developments through formal corporate announcements issued by the Group. This newsroom provides a central record of material updates, strategic developments, business activities and other official communications."}),w.jsx("p",{className:"text-[15px] leading-[1.7] text-[#4A4A4A] italic",children:"All releases published on this page represent official corporate communications from Alrazah."})]})]})})}),w.jsxs("section",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-16 md:py-20",children:[w.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-6 pb-8 border-b border-[#0A0A0A]",children:[w.jsxs("div",{children:[w.jsx("h2",{className:"font-serif-al text-[28px] md:text-[34px] font-medium text-[#0A0A0A] leading-[1.1]",children:"Latest announcements"}),w.jsx("p",{className:"mt-2 text-[15px] text-[#4A4A4A]",children:"Browse Alrazah's corporate announcements by date, category or keyword."})]}),w.jsxs("div",{className:"hidden lg:flex items-center gap-3",children:[w.jsxs("div",{className:"relative",children:[w.jsx(Sd,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#4A4A4A]",strokeWidth:1.6}),w.jsx("input",{type:"text",value:o,onChange:z=>a(z.target.value),placeholder:"Search press releases","aria-label":"Search press releases",className:"w-[280px] h-11 pl-9 pr-9 text-[14px] bg-white border border-[#D9D9D9] focus:border-[#8D0034] focus:outline-none transition-colors al-focus-ring"}),o&&w.jsx("button",{onClick:()=>a(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-[#4A4A4A] hover:text-[#8D0034]","aria-label":"Clear search",children:w.jsx(Fo,{size:15})})]}),w.jsx(df,{value:u,onChange:f,label:"All Years",options:["All Years",...E.map(String)]}),w.jsx(df,{value:h,onChange:p,label:"All Categories",options:["All Categories",..._w]}),w.jsx(df,{value:m==="latest"?"Latest first":"Oldest first",onChange:z=>y(z==="Latest first"?"latest":"oldest"),label:"Latest first",options:["Latest first","Oldest first"]})]}),w.jsxs("button",{onClick:()=>_(!0),className:"lg:hidden flex items-center justify-center gap-2 h-11 px-5 border border-[#0A0A0A] text-[13px] font-medium uppercase tracking-[0.06em] al-focus-ring",children:[w.jsx(Ok,{size:16,strokeWidth:1.6})," Filter & Search"]})]}),O.length>0&&w.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-5",children:[w.jsx("span",{className:"text-[12px] text-[#4A4A4A] uppercase tracking-[0.08em] mr-1",children:"Active:"}),O.map(z=>w.jsxs("button",{onClick:()=>{z.key==="year"&&f("All Years"),z.key==="category"&&p("All Categories"),z.key==="q"&&a("")},className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-[12px] font-medium text-[#8D0034] bg-[#F4E8ED] border border-[#E0C8D2] hover:bg-[#EFDCE4] transition-colors al-focus-ring",children:[z.label," ",w.jsx(Fo,{size:12,strokeWidth:2})]},z.key)),w.jsx("button",{onClick:Q,className:"text-[12px] font-medium text-[#4A4A4A] underline hover:text-[#8D0034] ml-1 al-focus-ring",children:"Clear all"})]}),w.jsx("div",{className:"mt-6 mb-2 text-[13px] text-[#4A4A4A]",children:n?"Loading announcements…":k.length===0?"No announcements found":`Showing ${(C-1)*bo+1}–${Math.min(C*bo,k.length)} of ${k.length} announcements`}),!n&&V&&u==="All Years"&&h==="All Categories"&&!o.trim()&&C===1&&w.jsx(pR,{release:V}),n?w.jsx("div",{className:"py-20 text-center text-[#4A4A4A] text-[14px]",children:"Loading corporate announcements…"}):D.length===0?w.jsx(mR,{onClear:Q}):w.jsx("div",{className:"border-t border-[#E4E4E4]",children:D.map(z=>w.jsx(hR,{release:z},z.id))}),!n&&P>1&&w.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row items-center justify-between gap-4",children:[w.jsxs("button",{disabled:C===1,onClick:()=>v(C-1),className:"inline-flex items-center gap-2 text-[13px] font-medium text-[#0A0A0A] disabled:opacity-30 hover:text-[#8D0034] transition-colors al-focus-ring",children:[w.jsx(Kv,{size:15,strokeWidth:1.6})," Previous"]}),w.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:P}).map((z,K)=>{const G=K+1;return P>7&&Math.abs(G-C)>3&&G!==1&&G!==P?G===2||G===P-1?w.jsx("span",{className:"px-1 text-[#9A9A9A]",children:"…"},G):null:w.jsx("button",{onClick:()=>v(G),"aria-current":G===C,className:`w-9 h-9 text-[13px] font-medium transition-colors al-focus-ring ${G===C?"bg-[#8D0034] text-white":"text-[#0A0A0A] hover:text-[#8D0034]"}`,children:G},G)})}),w.jsxs("button",{disabled:C===P,onClick:()=>v(C+1),className:"inline-flex items-center gap-2 text-[13px] font-medium text-[#0A0A0A] disabled:opacity-30 hover:text-[#8D0034] transition-colors al-focus-ring",children:["Next ",w.jsx(us,{size:15,strokeWidth:1.6})]})]})]}),w.jsx("section",{className:"bg-[#650026] text-white",children:w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-16 md:py-20",children:w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_auto] gap-8 items-center",children:[w.jsxs("div",{children:[w.jsx("h2",{className:"font-serif-al text-[30px] md:text-[38px] font-medium leading-[1.1] mb-4",children:"Stay informed about Alrazah"}),w.jsx("p",{className:"text-[16px] md:text-[17px] leading-[1.6] text-white/80 max-w-[640px]",children:"Follow the Group's latest corporate developments, announcements and institutional updates."})]}),w.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[w.jsx("a",{href:"/contact",className:"inline-flex items-center justify-center px-7 h-12 bg-white text-[#650026] text-[13px] font-semibold uppercase tracking-[0.08em] hover:bg-[#F4E8ED] transition-colors al-focus-ring",children:"Contact us"}),w.jsxs("a",{href:"/about",className:"inline-flex items-center justify-center gap-2 px-7 h-12 border border-white/40 text-white text-[13px] font-semibold uppercase tracking-[0.08em] hover:bg-white/10 transition-colors al-focus-ring",children:["About Alrazah ",w.jsx(us,{size:15,strokeWidth:1.6})]})]})]})})}),w.jsx("section",{className:"border-b border-[#E4E4E4]",children:w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-12 md:py-14",children:w.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-5",children:[w.jsxs("div",{children:[w.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-[0.14em] text-[#8D0034] mb-2",children:"Have an enquiry?"}),w.jsx("p",{className:"text-[15px] text-[#4A4A4A] max-w-[560px]",children:"For general corporate enquiries, please contact Alrazah directly."})]}),w.jsxs("a",{href:"/contact",className:"inline-flex items-center gap-2 px-6 h-11 border border-[#8D0034] text-[#8D0034] text-[13px] font-semibold uppercase tracking-[0.08em] hover:bg-[#8D0034] hover:text-white transition-colors al-focus-ring",children:["Contact us ",w.jsx(us,{size:15,strokeWidth:1.6})]})]})})}),w.jsx(rd,{}),R&&w.jsx(gR,{query:o,setQuery:a,year:u,setYear:f,years:E.map(String),category:h,setCategory:p,sort:m,setSort:y,onClose:()=>_(!1),onClear:Q})]})}function df({value:e,onChange:t,label:n,options:i}){return w.jsxs("div",{className:"relative",children:[w.jsx("select",{value:e,onChange:o=>t(o.target.value),"aria-label":n,className:"appearance-none h-11 pl-4 pr-9 text-[13px] font-medium bg-white border border-[#D9D9D9] focus:border-[#8D0034] focus:outline-none transition-colors cursor-pointer al-focus-ring",children:i.map(o=>w.jsx("option",{value:o,children:o},o))}),w.jsx(_k,{size:14,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[#4A4A4A]",strokeWidth:1.6})]})}function hR({release:e}){return w.jsx("a",{href:`/news-media/press-releases/${e.slug}`,className:"group block border-b border-[#E4E4E4] hover:bg-[#F4E8ED]/40 hover:border-b-[#8D0034] transition-all duration-200",children:w.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[140px_130px_1fr_auto] gap-4 md:gap-6 py-6 md:py-7 items-start",children:[w.jsxs("div",{className:"flex md:block items-center gap-3",children:[w.jsx("div",{className:"font-mono-al text-[13px] font-medium text-[#8D0034] tracking-[0.06em]",children:Cw(e.publication_date)}),e.location&&w.jsx("div",{className:"text-[12px] text-[#4A4A4A] mt-1 hidden md:block",children:e.location})]}),w.jsxs("div",{className:"flex items-stretch",children:[w.jsx("span",{className:"md:w-[2px] w-[2px] bg-[#8D0034] mr-2.5 shrink-0"}),w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-[#0A0A0A] pt-0.5",children:e.category})]}),w.jsxs("div",{className:"max-w-[650px]",children:[w.jsx("h3",{className:"font-serif-al text-[18px] md:text-[20px] font-medium leading-[1.3] text-[#0A0A0A] group-hover:text-[#8D0034] transition-colors duration-200",children:e.title}),e.excerpt&&w.jsx("p",{className:"mt-2 text-[14px] leading-[1.55] text-[#4A4A4A] line-clamp-2 md:line-clamp-none",children:e.excerpt})]}),w.jsxs("div",{className:"flex items-center",children:[w.jsx("span",{className:"hidden md:inline-flex items-center gap-1.5 text-[12px] font-semibold uppercase tracking-[0.08em] text-[#0A0A0A] group-hover:text-[#8D0034] transition-colors",children:"Read release"}),w.jsx(us,{size:18,className:"ml-2 text-[#0A0A0A] group-hover:text-[#8D0034] group-hover:translate-x-1 transition-all duration-200",strokeWidth:1.6})]})]})})}function pR({release:e}){return w.jsx("div",{className:"mt-8 mb-2 border border-[#E4E4E4] border-l-4 border-l-[#8D0034] bg-[#F4E8ED]/60",children:w.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[260px_1fr] gap-6 md:gap-10 p-7 md:p-9",children:[w.jsxs("div",{children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8D0034] mb-4",children:"Featured Announcement"}),w.jsx("div",{className:"font-mono-al text-[13px] font-medium text-[#8D0034] tracking-[0.06em]",children:Cw(e.publication_date)}),w.jsxs("div",{className:"mt-2 flex items-stretch",children:[w.jsx("span",{className:"w-[2px] bg-[#8D0034] mr-2.5"}),w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-[#0A0A0A] pt-0.5",children:e.category})]}),e.location&&w.jsx("div",{className:"mt-2 text-[12px] text-[#4A4A4A]",children:e.location})]}),w.jsxs("div",{children:[w.jsx("h3",{className:"font-serif-al text-[22px] md:text-[26px] font-medium leading-[1.25] text-[#0A0A0A] mb-3",children:e.title}),e.excerpt&&w.jsx("p",{className:"text-[15px] leading-[1.6] text-[#4A4A4A] mb-5 max-w-[640px]",children:e.excerpt}),w.jsxs("a",{href:`/news-media/press-releases/${e.slug}`,className:"inline-flex items-center gap-2 text-[13px] font-semibold uppercase tracking-[0.08em] text-[#8D0034] hover:gap-3 transition-all al-focus-ring",children:["Read release ",w.jsx(us,{size:16,strokeWidth:1.6})]})]})]})})}function mR({onClear:e}){return w.jsxs("div",{className:"border border-[#E4E4E4] border-t-0 py-20 px-6 text-center",children:[w.jsx(Yv,{size:36,className:"mx-auto text-[#8D0034] mb-5",strokeWidth:1.5}),w.jsx("h3",{className:"font-serif-al text-[22px] font-medium text-[#0A0A0A] mb-3",children:"No announcements found"}),w.jsx("p",{className:"text-[15px] text-[#4A4A4A] max-w-[480px] mx-auto mb-6",children:"We could not find any press releases matching your selected criteria. Adjust your filters or search again."}),w.jsx("button",{onClick:e,className:"inline-flex items-center gap-2 px-6 h-11 border border-[#8D0034] text-[#8D0034] text-[13px] font-semibold uppercase tracking-[0.08em] hover:bg-[#8D0034] hover:text-white transition-colors al-focus-ring",children:"Clear filters"})]})}function gR({query:e,setQuery:t,year:n,setYear:i,years:o,category:a,setCategory:u,sort:f,setSort:h,onClose:p,onClear:m}){return w.jsxs("div",{className:"lg:hidden fixed inset-0 z-[100] flex flex-col",role:"dialog","aria-modal":"true",children:[w.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:p}),w.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-[#F9F8F6] max-h-[88vh] overflow-y-auto",children:[w.jsxs("div",{className:"sticky top-0 flex items-center justify-between px-5 py-4 bg-[#F9F8F6] border-b border-[#E4E4E4]",children:[w.jsx("span",{className:"text-[14px] font-semibold uppercase tracking-[0.08em]",children:"Filter & Search"}),w.jsx("button",{onClick:p,"aria-label":"Close filters",className:"p-2",children:w.jsx(Fo,{size:20})})]}),w.jsxs("div",{className:"p-5 space-y-5",children:[w.jsxs("div",{children:[w.jsx("label",{className:"block text-[12px] font-semibold uppercase tracking-[0.08em] text-[#4A4A4A] mb-2",children:"Search"}),w.jsxs("div",{className:"relative",children:[w.jsx(Sd,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#4A4A4A]"}),w.jsx("input",{value:e,onChange:y=>t(y.target.value),placeholder:"Search press releases",className:"w-full h-11 pl-9 pr-3 text-[14px] bg-white border border-[#D9D9D9] focus:border-[#8D0034] focus:outline-none"})]})]}),w.jsxs("div",{children:[w.jsx("label",{className:"block text-[12px] font-semibold uppercase tracking-[0.08em] text-[#4A4A4A] mb-2",children:"Year"}),w.jsxs("select",{value:n,onChange:y=>i(y.target.value),className:"w-full h-11 px-3 bg-white border border-[#D9D9D9]",children:[w.jsx("option",{children:"All Years"}),o.map(y=>w.jsx("option",{children:y},y))]})]}),w.jsxs("div",{children:[w.jsx("label",{className:"block text-[12px] font-semibold uppercase tracking-[0.08em] text-[#4A4A4A] mb-2",children:"Category"}),w.jsxs("select",{value:a,onChange:y=>u(y.target.value),className:"w-full h-11 px-3 bg-white border border-[#D9D9D9]",children:[w.jsx("option",{children:"All Categories"}),_w.map(y=>w.jsx("option",{children:y},y))]})]}),w.jsxs("div",{children:[w.jsx("label",{className:"block text-[12px] font-semibold uppercase tracking-[0.08em] text-[#4A4A4A] mb-2",children:"Sort"}),w.jsxs("select",{value:f==="latest"?"Latest first":"Oldest first",onChange:y=>h(y.target.value==="Latest first"?"latest":"oldest"),className:"w-full h-11 px-3 bg-white border border-[#D9D9D9]",children:[w.jsx("option",{children:"Latest first"}),w.jsx("option",{children:"Oldest first"})]})]})]}),w.jsxs("div",{className:"sticky bottom-0 flex gap-3 p-5 bg-[#F9F8F6] border-t border-[#E4E4E4]",children:[w.jsx("button",{onClick:m,className:"flex-1 h-11 border border-[#0A0A0A] text-[13px] font-semibold uppercase tracking-[0.06em]",children:"Clear"}),w.jsx("button",{onClick:p,className:"flex-1 h-11 bg-[#8D0034] text-white text-[13px] font-semibold uppercase tracking-[0.06em]",children:"Apply"})]})]})]})}function yR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wR={};function wy(e,t){return(wR.jsx?xR:vR).test(e)}const bR=/[ \t\n\f\r]/g;function kR(e){return typeof e=="object"?e.type==="text"?by(e.value):!1:by(e)}function by(e){return e.replace(bR,"")===""}class nl{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}nl.prototype.normal={};nl.prototype.property={};nl.prototype.space=void 0;function Aw(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new nl(n,i,t)}function sd(e){return e.toLowerCase()}class en{constructor(t,n){this.attribute=n,this.property=t}}en.prototype.attribute="";en.prototype.booleanish=!1;en.prototype.boolean=!1;en.prototype.commaOrSpaceSeparated=!1;en.prototype.commaSeparated=!1;en.prototype.defined=!1;en.prototype.mustUseProperty=!1;en.prototype.number=!1;en.prototype.overloadedBoolean=!1;en.prototype.property="";en.prototype.spaceSeparated=!1;en.prototype.space=void 0;let SR=0;const Oe=Ii(),ut=Ii(),od=Ii(),ie=Ii(),Ke=Ii(),fs=Ii(),un=Ii();function Ii(){return 2**++SR}const ld=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:ut,commaOrSpaceSeparated:un,commaSeparated:fs,number:ie,overloadedBoolean:od,spaceSeparated:Ke},Symbol.toStringTag,{value:"Module"})),hf=Object.keys(ld);class qd extends en{constructor(t,n,i,o){let a=-1;if(super(t,n),ky(this,"space",o),typeof i=="number")for(;++a4&&n.slice(0,4)==="data"&&TR.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Sy,NR);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Sy.test(a)){let u=a.replace(AR,PR);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=qd}return new o(i,t)}function PR(e){return"-"+e.toLowerCase()}function NR(e){return e.charAt(1).toUpperCase()}const OR=Aw([Tw,ER,Nw,Ow,Iw],"html"),Wd=Aw([Tw,_R,Nw,Ow,Iw],"svg");function IR(e){return e.join(" ").trim()}var os={},pf,Ey;function LR(){if(Ey)return pf;Ey=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,h=` `,p="/",m="*",y="",x="comment",v="declaration";function R(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var P=1,C=1;function D(W){var Y=W.match(t);Y&&(P+=Y.length);var ce=W.lastIndexOf(h);C=~ce?W.length-ce:C+W.length}function V(){var W={line:P,column:C};return function(Y){return Y.position=new O(W),K(),Y}}function O(W){this.start=W,this.end={line:P,column:C},this.source=k.source}O.prototype.content=E;function Q(W){var Y=new Error(k.source+":"+P+":"+C+": "+W);if(Y.reason=W,Y.filename=k.source,Y.line=P,Y.column=C,Y.source=E,!k.silent)throw Y}function z(W){var Y=W.exec(E);if(Y){var ce=Y[0];return D(ce),E=E.slice(ce.length),Y}}function K(){z(n)}function G(W){var Y;for(W=W||[];Y=Z();)Y!==!1&&W.push(Y);return W}function Z(){var W=V();if(!(p!=E.charAt(0)||m!=E.charAt(1))){for(var Y=2;y!=E.charAt(Y)&&(m!=E.charAt(Y)||p!=E.charAt(Y+1));)++Y;if(Y+=2,y===E.charAt(Y-1))return Q("End of comment missing");var ce=E.slice(2,Y-2);return C+=2,D(ce),E=E.slice(Y),C+=2,W({type:x,comment:ce})}}function re(){var W=V(),Y=z(i);if(Y){if(Z(),!z(o))return Q("property missing ':'");var ce=z(a),xe=W({type:v,property:_(Y[0].replace(e,y)),value:ce?_(ce[0].replace(e,y)):y});return z(u),xe}}function ue(){var W=[];G(W);for(var Y;Y=re();)Y!==!1&&(W.push(Y),G(W));return W}return K(),ue()}function _(E){return E?E.replace(f,y):y}return pf=R,pf}var _y;function DR(){if(_y)return os;_y=1;var e=os&&os.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(os,"__esModule",{value:!0}),os.default=n;const t=e(LR());function n(i,o){let a=null;if(!i||typeof i!="string")return a;const u=(0,t.default)(i),f=typeof o=="function";return u.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:m}=h;f?o(p,m,h):m&&(a=a||{},a[p]=m)}),a}return os}var ko={},Cy;function jR(){if(Cy)return ko;Cy=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(p){return!p||n.test(p)||e.test(p)},u=function(p,m){return m.toUpperCase()},f=function(p,m){return"".concat(m,"-")},h=function(p,m){return m===void 0&&(m={}),a(p)?p:(p=p.toLowerCase(),m.reactCompat?p=p.replace(o,f):p=p.replace(i,f),p.replace(t,u))};return ko.camelCase=h,ko}var So,Ay;function FR(){if(Ay)return So;Ay=1;var e=So&&So.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(DR()),n=jR();function i(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(f,h){f&&h&&(u[(0,n.camelCase)(f,a)]=h)}),u}return i.default=i,So=i,So}var MR=FR();const zR=Qo(MR),Lw=Dw("end"),Qd=Dw("start");function Dw(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function UR(e){const t=Qd(e),n=Lw(e);if(t&&n)return{start:t,end:n}}function Io(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ty(e.position):"start"in e||"end"in e?Ty(e):"line"in e||"column"in e?ad(e):""}function ad(e){return Ry(e&&e.line)+":"+Ry(e&&e.column)}function Ty(e){return ad(e&&e.start)+"-"+ad(e&&e.end)}function Ry(e){return e&&typeof e=="number"?e:1}class Lt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?a.ruleId=i:(a.source=i.slice(0,h),a.ruleId=i.slice(h+1))}if(!a.place&&a.ancestors&&a.ancestors){const h=a.ancestors[a.ancestors.length-1];h&&(a.place=h.position)}const f=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Io(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Lt.prototype.file="";Lt.prototype.name="";Lt.prototype.reason="";Lt.prototype.message="";Lt.prototype.stack="";Lt.prototype.column=void 0;Lt.prototype.line=void 0;Lt.prototype.ancestors=void 0;Lt.prototype.cause=void 0;Lt.prototype.fatal=void 0;Lt.prototype.place=void 0;Lt.prototype.ruleId=void 0;Lt.prototype.source=void 0;const Kd={}.hasOwnProperty,BR=new Map,$R=/[A-Z]/g,VR=new Set(["table","tbody","thead","tfoot","tr"]),HR=new Set(["td","th"]),jw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qR(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=ZR(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=JR(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Wd:OR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Fw(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Fw(e,t,n){if(t.type==="element")return WR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return QR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return YR(e,t,n);if(t.type==="mdxjsEsm")return KR(e,t);if(t.type==="root")return GR(e,t,n);if(t.type==="text")return XR(e,t)}function WR(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=Wd,e.schema=o),e.ancestors.push(t);const a=zw(e,t.tagName,!1),u=eP(e,t);let f=Gd(e,t);return VR.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!kR(h):!0})),Mw(e,u,a,t),Yd(u,f),e.ancestors.pop(),e.schema=i,e.create(t,a,u,n)}function QR(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Bo(e,t.position)}function KR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bo(e,t.position)}function YR(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=Wd,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:zw(e,t.name,!0),u=tP(e,t),f=Gd(e,t);return Mw(e,u,a,t),Yd(u,f),e.ancestors.pop(),e.schema=i,e.create(t,a,u,n)}function GR(e,t,n){const i={};return Yd(i,Gd(e,t)),e.create(t,e.Fragment,i,n)}function XR(e,t){return t.value}function Mw(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Yd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function JR(e,t,n){return i;function i(o,a,u,f){const p=Array.isArray(u.children)?n:t;return f?p(a,u,f):p(a,u)}}function ZR(e,t){return n;function n(i,o,a,u){const f=Array.isArray(a.children),h=Qd(i);return t(o,a,u,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function eP(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&Kd.call(t.properties,o)){const a=nP(e,o,t.properties[o]);if(a){const[u,f]=a;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&HR.has(t.tagName)?i=f:n[u]=f}}if(i){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function tP(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const u=a.expression;u.type;const f=u.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Bo(e,t.position);else{const o=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,a=e.evaluater.evaluateExpression(f.expression)}else Bo(e,t.position);else a=i.value===null?!0:i.value;n[o]=a}return n}function Gd(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:BR;for(;++io?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)u=Array.from(i),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a0?(Gn(e,e.length,0,t),e):t}const Oy={}.hasOwnProperty;function cP(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ds(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qn=Yr(/[A-Za-z]/),fn=Yr(/[\dA-Za-z]/),hP=Yr(/[#-'*+\--9=?A-Z^-~]/);function ud(e){return e!==null&&(e<32||e===127)}const cd=Yr(/\d/),pP=Yr(/[\dA-Fa-f]/),mP=Yr(/[!-/:-@[-`{-~]/);function Pe(e){return e!==null&&e<-2}function Jt(e){return e!==null&&(e<0||e===32)}function Ve(e){return e===-2||e===-1||e===32}const gP=Yr(new RegExp("\\p{P}|\\p{S}","u")),yP=Yr(/\s/);function Yr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Os(e){const t=[];let n=-1,i=0,o=0;for(;++n55295&&a<57344){const f=e.charCodeAt(n+1);a<56320&&f>56319&&f<57344?(u=String.fromCharCode(a,f),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(i,n),encodeURIComponent(u)),i=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function Ye(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(h){return Ve(h)?(e.enter(n),f(h)):t(h)}function f(h){return Ve(h)&&a++u))return;const Q=t.events.length;let z=Q,K,G;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(K){G=t.events[z][1].end;break}K=!0}for(k(i),O=Q;OC;){const V=n[D];t.containerState=V[1],V[0].exit.call(t,e)}n.length=C}function P(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function kP(e,t,n){return Ye(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ly(e){if(e===null||Jt(e)||yP(e))return 1;if(gP(e))return 2}function Jd(e,t,n){const i=[];let o=-1;for(;++o1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const y={...e[i][1].end},x={...e[n][1].start};Dy(y,-h),Dy(x,h),u={type:h>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},a={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:h>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[i][1].end={...u.start},e[n][1].start={...f.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=kn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=kn(p,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),p=kn(p,Jd(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),p=kn(p,[["exit",a,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,p=kn(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Gn(e,i-1,n-i+3,p),n=i+p.length-m-2;break}}for(n=-1;++n0&&Ve(O)?Ye(e,P,"linePrefix",a+1)(O):P(O)}function P(O){return O===null||Pe(O)?e.check(jy,_,D)(O):(e.enter("codeFlowValue"),C(O))}function C(O){return O===null||Pe(O)?(e.exit("codeFlowValue"),P(O)):(e.consume(O),C)}function D(O){return e.exit("codeFenced"),t(O)}function V(O,Q,z){let K=0;return G;function G(Y){return O.enter("lineEnding"),O.consume(Y),O.exit("lineEnding"),Z}function Z(Y){return O.enter("codeFencedFence"),Ve(Y)?Ye(O,re,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):re(Y)}function re(Y){return Y===f?(O.enter("codeFencedFenceSequence"),ue(Y)):z(Y)}function ue(Y){return Y===f?(K++,O.consume(Y),ue):K>=u?(O.exit("codeFencedFenceSequence"),Ve(Y)?Ye(O,W,"whitespace")(Y):W(Y)):z(Y)}function W(Y){return Y===null||Pe(Y)?(O.exit("codeFencedFence"),Q(Y)):z(Y)}}}function LP(e,t,n){const i=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return i.parser.lazy[i.now().line]?n(u):t(u)}}const gf={name:"codeIndented",tokenize:jP},DP={partial:!0,tokenize:FP};function jP(e,t,n){const i=this;return o;function o(p){return e.enter("codeIndented"),Ye(e,a,"linePrefix",5)(p)}function a(p){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(p):n(p)}function u(p){return p===null?h(p):Pe(p)?e.attempt(DP,u,h)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Pe(p)?(e.exit("codeFlowValue"),u(p)):(e.consume(p),f)}function h(p){return e.exit("codeIndented"),t(p)}}function FP(e,t,n){const i=this;return o;function o(u){return i.parser.lazy[i.now().line]?n(u):Pe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Ye(e,a,"linePrefix",5)(u)}function a(u){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):Pe(u)?o(u):n(u)}}const MP={name:"codeText",previous:UP,resolve:zP,tokenize:BP};function zP(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&Eo(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Eo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Eo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(u):e.interrupt(i.parser.constructs.flow,n,t)(u)}}function Ww(e,t,n,i,o,a,u,f,h){const p=h||Number.POSITIVE_INFINITY;let m=0;return y;function y(k){return k===60?(e.enter(i),e.enter(o),e.enter(a),e.consume(k),e.exit(a),x):k===null||k===32||k===41||ud(k)?n(k):(e.enter(i),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),_(k))}function x(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(o),e.exit(i),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===62?(e.exit("chunkString"),e.exit(f),x(k)):k===null||k===60||Pe(k)?n(k):(e.consume(k),k===92?R:v)}function R(k){return k===60||k===62||k===92?(e.consume(k),v):v(k)}function _(k){return!m&&(k===null||k===41||Jt(k))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(i),t(k)):m999||v===null||v===91||v===93&&!h||v===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?n(v):v===93?(e.exit(a),e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):Pe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||Pe(v)||f++>999?(e.exit("chunkString"),m(v)):(e.consume(v),h||(h=!Ve(v)),v===92?x:y)}function x(v){return v===91||v===92||v===93?(e.consume(v),f++,y):y(v)}}function Kw(e,t,n,i,o,a){let u;return f;function f(x){return x===34||x===39||x===40?(e.enter(i),e.enter(o),e.consume(x),e.exit(o),u=x===40?41:x,h):n(x)}function h(x){return x===u?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),t):(e.enter(a),p(x))}function p(x){return x===u?(e.exit(a),h(u)):x===null?n(x):Pe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ye(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===u||x===null||Pe(x)?(e.exit("chunkString"),p(x)):(e.consume(x),x===92?y:m)}function y(x){return x===u||x===92?(e.consume(x),m):m(x)}}function Lo(e,t){let n;return i;function i(o){return Pe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Ve(o)?Ye(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const YP={name:"definition",tokenize:XP},GP={partial:!0,tokenize:JP};function XP(e,t,n){const i=this;let o;return a;function a(v){return e.enter("definition"),u(v)}function u(v){return Qw.call(i,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return o=ds(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),h):n(v)}function h(v){return Jt(v)?Lo(e,p)(v):p(v)}function p(v){return Ww(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function m(v){return e.attempt(GP,y,y)(v)}function y(v){return Ve(v)?Ye(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Pe(v)?(e.exit("definition"),i.parser.defined.push(o),t(v)):n(v)}}function JP(e,t,n){return i;function i(f){return Jt(f)?Lo(e,o)(f):n(f)}function o(f){return Kw(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function a(f){return Ve(f)?Ye(e,u,"whitespace")(f):u(f)}function u(f){return f===null||Pe(f)?t(f):n(f)}}const ZP={name:"hardBreakEscape",tokenize:eN};function eN(e,t,n){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Pe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const tN={name:"headingAtx",resolve:nN,tokenize:rN};function nN(e,t){let n=e.length-2,i=3,o,a;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},a={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Gn(e,i,n-i+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function rN(e,t,n){let i=0;return o;function o(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&i++<6?(e.consume(m),u):m===null||Jt(m)?(e.exit("atxHeadingSequence"),f(m)):n(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Pe(m)?(e.exit("atxHeading"),t(m)):Ve(m)?Ye(e,f,"whitespace")(m):(e.enter("atxHeadingText"),p(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),f(m))}function p(m){return m===null||m===35||Jt(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),p)}}const iN=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],My=["pre","script","style","textarea"],sN={concrete:!0,name:"htmlFlow",resolveTo:aN,tokenize:uN},oN={partial:!0,tokenize:fN},lN={partial:!0,tokenize:cN};function aN(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function uN(e,t,n){const i=this;let o,a,u,f,h;return p;function p(A){return m(A)}function m(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),y}function y(A){return A===33?(e.consume(A),x):A===47?(e.consume(A),a=!0,_):A===63?(e.consume(A),o=3,i.interrupt?t:S):Qn(A)?(e.consume(A),u=String.fromCharCode(A),E):n(A)}function x(A){return A===45?(e.consume(A),o=2,v):A===91?(e.consume(A),o=5,f=0,R):Qn(A)?(e.consume(A),o=4,i.interrupt?t:S):n(A)}function v(A){return A===45?(e.consume(A),i.interrupt?t:S):n(A)}function R(A){const ye="CDATA[";return A===ye.charCodeAt(f++)?(e.consume(A),f===ye.length?i.interrupt?t:re:R):n(A)}function _(A){return Qn(A)?(e.consume(A),u=String.fromCharCode(A),E):n(A)}function E(A){if(A===null||A===47||A===62||Jt(A)){const ye=A===47,be=u.toLowerCase();return!ye&&!a&&My.includes(be)?(o=1,i.interrupt?t(A):re(A)):iN.includes(u.toLowerCase())?(o=6,ye?(e.consume(A),k):i.interrupt?t(A):re(A)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(A):a?P(A):C(A))}return A===45||fn(A)?(e.consume(A),u+=String.fromCharCode(A),E):n(A)}function k(A){return A===62?(e.consume(A),i.interrupt?t:re):n(A)}function P(A){return Ve(A)?(e.consume(A),P):G(A)}function C(A){return A===47?(e.consume(A),G):A===58||A===95||Qn(A)?(e.consume(A),D):Ve(A)?(e.consume(A),C):G(A)}function D(A){return A===45||A===46||A===58||A===95||fn(A)?(e.consume(A),D):V(A)}function V(A){return A===61?(e.consume(A),O):Ve(A)?(e.consume(A),V):C(A)}function O(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),h=A,Q):Ve(A)?(e.consume(A),O):z(A)}function Q(A){return A===h?(e.consume(A),h=null,K):A===null||Pe(A)?n(A):(e.consume(A),Q)}function z(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Jt(A)?V(A):(e.consume(A),z)}function K(A){return A===47||A===62||Ve(A)?C(A):n(A)}function G(A){return A===62?(e.consume(A),Z):n(A)}function Z(A){return A===null||Pe(A)?re(A):Ve(A)?(e.consume(A),Z):n(A)}function re(A){return A===45&&o===2?(e.consume(A),ce):A===60&&o===1?(e.consume(A),xe):A===62&&o===4?(e.consume(A),L):A===63&&o===3?(e.consume(A),S):A===93&&o===5?(e.consume(A),ae):Pe(A)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(oN,H,ue)(A)):A===null||Pe(A)?(e.exit("htmlFlowData"),ue(A)):(e.consume(A),re)}function ue(A){return e.check(lN,W,H)(A)}function W(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Y}function Y(A){return A===null||Pe(A)?ue(A):(e.enter("htmlFlowData"),re(A))}function ce(A){return A===45?(e.consume(A),S):re(A)}function xe(A){return A===47?(e.consume(A),u="",ee):re(A)}function ee(A){if(A===62){const ye=u.toLowerCase();return My.includes(ye)?(e.consume(A),L):re(A)}return Qn(A)&&u.length<8?(e.consume(A),u+=String.fromCharCode(A),ee):re(A)}function ae(A){return A===93?(e.consume(A),S):re(A)}function S(A){return A===62?(e.consume(A),L):A===45&&o===2?(e.consume(A),S):re(A)}function L(A){return A===null||Pe(A)?(e.exit("htmlFlowData"),H(A)):(e.consume(A),L)}function H(A){return e.exit("htmlFlow"),t(A)}}function cN(e,t,n){const i=this;return o;function o(u){return Pe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return i.parser.lazy[i.now().line]?n(u):t(u)}}function fN(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(nu,t,n)}}const dN={name:"htmlText",tokenize:hN};function hN(e,t,n){const i=this;let o,a,u;return f;function f(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),h}function h(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),V):S===63?(e.consume(S),C):Qn(S)?(e.consume(S),z):n(S)}function p(S){return S===45?(e.consume(S),m):S===91?(e.consume(S),a=0,R):Qn(S)?(e.consume(S),P):n(S)}function m(S){return S===45?(e.consume(S),v):n(S)}function y(S){return S===null?n(S):S===45?(e.consume(S),x):Pe(S)?(u=y,xe(S)):(e.consume(S),y)}function x(S){return S===45?(e.consume(S),v):y(S)}function v(S){return S===62?ce(S):S===45?x(S):y(S)}function R(S){const L="CDATA[";return S===L.charCodeAt(a++)?(e.consume(S),a===L.length?_:R):n(S)}function _(S){return S===null?n(S):S===93?(e.consume(S),E):Pe(S)?(u=_,xe(S)):(e.consume(S),_)}function E(S){return S===93?(e.consume(S),k):_(S)}function k(S){return S===62?ce(S):S===93?(e.consume(S),k):_(S)}function P(S){return S===null||S===62?ce(S):Pe(S)?(u=P,xe(S)):(e.consume(S),P)}function C(S){return S===null?n(S):S===63?(e.consume(S),D):Pe(S)?(u=C,xe(S)):(e.consume(S),C)}function D(S){return S===62?ce(S):C(S)}function V(S){return Qn(S)?(e.consume(S),O):n(S)}function O(S){return S===45||fn(S)?(e.consume(S),O):Q(S)}function Q(S){return Pe(S)?(u=Q,xe(S)):Ve(S)?(e.consume(S),Q):ce(S)}function z(S){return S===45||fn(S)?(e.consume(S),z):S===47||S===62||Jt(S)?K(S):n(S)}function K(S){return S===47?(e.consume(S),ce):S===58||S===95||Qn(S)?(e.consume(S),G):Pe(S)?(u=K,xe(S)):Ve(S)?(e.consume(S),K):ce(S)}function G(S){return S===45||S===46||S===58||S===95||fn(S)?(e.consume(S),G):Z(S)}function Z(S){return S===61?(e.consume(S),re):Pe(S)?(u=Z,xe(S)):Ve(S)?(e.consume(S),Z):K(S)}function re(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,ue):Pe(S)?(u=re,xe(S)):Ve(S)?(e.consume(S),re):(e.consume(S),W)}function ue(S){return S===o?(e.consume(S),o=void 0,Y):S===null?n(S):Pe(S)?(u=ue,xe(S)):(e.consume(S),ue)}function W(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Jt(S)?K(S):(e.consume(S),W)}function Y(S){return S===47||S===62||Jt(S)?K(S):n(S)}function ce(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function xe(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),ee}function ee(S){return Ve(S)?Ye(e,ae,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ae(S)}function ae(S){return e.enter("htmlTextData"),u(S)}}const Zd={name:"labelEnd",resolveAll:yN,resolveTo:vN,tokenize:xN},pN={tokenize:wN},mN={tokenize:bN},gN={tokenize:kN};function yN(e){let t=-1;const n=[];for(;++t=3&&(p===null||Pe(p))?(e.exit("thematicBreak"),t(p)):n(p)}function h(p){return p===o?(e.consume(p),i++,h):(e.exit("thematicBreakSequence"),Ve(p)?Ye(e,f,"whitespace")(p):f(p))}}const Kt={continuation:{tokenize:ON},exit:LN,name:"list",tokenize:NN},RN={partial:!0,tokenize:DN},PN={partial:!0,tokenize:IN};function NN(e,t,n){const i=this,o=i.events[i.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return f;function f(v){const R=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(R==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:cd(v)){if(i.containerState.type||(i.containerState.type=R,e.enter(R,{_container:!0})),R==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(za,n,p)(v):p(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(v)}return n(v)}function h(v){return cd(v)&&++u<10?(e.consume(v),h):(!i.interrupt||u<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),p(v)):n(v)}function p(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(nu,i.interrupt?n:m,e.attempt(RN,x,y))}function m(v){return i.containerState.initialBlankLine=!0,a++,x(v)}function y(v){return Ve(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):n(v)}function x(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function ON(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(nu,o,a);function o(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ye(e,t,"listItemIndent",i.containerState.size+1)(f)}function a(f){return i.containerState.furtherBlankLines||!Ve(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(PN,t,u)(f))}function u(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ye(e,e.attempt(Kt,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function IN(e,t,n){const i=this;return Ye(e,o,"listItemIndent",i.containerState.size+1);function o(a){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?t(a):n(a)}}function LN(e){e.exit(this.containerState.type)}function DN(e,t,n){const i=this;return Ye(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=i.events[i.events.length-1];return!Ve(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const zy={name:"setextUnderline",resolveTo:jN,tokenize:FN};function jN(e,t){let n=e.length,i,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[i][1],t]),e[i][1].end={...e[a][1].end}):e[i][1]=u,e.push(["exit",u,t]),e}function FN(e,t,n){const i=this;let o;return a;function a(p){let m=i.events.length,y;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){y=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),o=p,u(p)):n(p)}function u(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===o?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Ve(p)?Ye(e,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Pe(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const MN={tokenize:zN};function zN(e){const t=this,n=e.attempt(nu,i,e.attempt(this.parser.constructs.flowInitial,o,Ye(e,e.attempt(this.parser.constructs.flow,o,e.attempt(HP,o)),"linePrefix")));return n;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const UN={resolveAll:Gw()},BN=Yw("string"),$N=Yw("text");function Yw(e){return{resolveAll:Gw(e==="text"?VN:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],a=n.attempt(o,u,f);return u;function u(m){return p(m)?a(m):f(m)}function f(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),h}function h(m){return p(m)?(n.exit("data"),a(m)):(n.consume(m),h)}function p(m){if(m===null)return!0;const y=o[m];let x=-1;if(y)for(;++x-1){const f=u[0];typeof f=="string"?u[0]=f.slice(i):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function nO(e,t){let n=-1;const i=[];let o;for(;++n0){const wt=Ae.tokenStack[Ae.tokenStack.length-1];(wt[1]||By).call(Ae,void 0,wt[0])}for(oe.position={start:Lr(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Lr(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze0&&(i.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function gO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=Os(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let u,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),u=e.footnoteOrder.length):u=a+1,f+=1,e.footnoteCounts.set(i,f);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,h);const p={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,p),e.applyData(t,p)}function xO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Zw(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=i:o.push({type:"text",value:i}),o}function bO(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Zw(e,t);const o={src:Os(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function kO(e,t){const n={src:Os(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function SO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function EO(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Zw(e,t);const o={href:Os(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function _O(e,t){const n={href:Os(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function CO(e,t,n){const i=e.all(t),o=n?AO(n):e0(t),a={},u=[];if(typeof t.checked=="boolean"){const m=i[0];let y;m&&m.type==="element"&&m.tagName==="p"?y=m:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let f=-1;for(;++f1}function TO(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=Qd(t.children[1]),h=Lw(t.children[t.children.length-1]);f&&h&&(u.position={start:f,end:h}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function IO(e,t,n){const i=n?n.children:void 0,a=(i?i.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,f=u?u.length:t.children.length;let h=-1;const p=[];for(;++h0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return a.push(Hy(t.slice(o),o>0,!1)),a.join("")}function Hy(e,t,n){let i=0,o=e.length;if(t){let a=e.codePointAt(i);for(;a===$y||a===Vy;)i++,a=e.codePointAt(i)}if(n){let a=e.codePointAt(o-1);for(;a===$y||a===Vy;)o--,a=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function jO(e,t){const n={type:"text",value:DO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function FO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const MO={blockquote:hO,break:pO,code:mO,delete:gO,emphasis:yO,footnoteReference:vO,heading:xO,html:wO,imageReference:bO,image:kO,inlineCode:SO,linkReference:EO,link:_O,listItem:CO,list:TO,paragraph:RO,root:PO,strong:NO,table:OO,tableCell:LO,tableRow:IO,text:jO,thematicBreak:FO,toml:_a,yaml:_a,definition:_a,footnoteDefinition:_a};function _a(){}const t0=-1,ru=0,Do=1,Qa=2,eh=3,th=4,nh=5,rh=6,n0=7,r0=8,qy=typeof self=="object"?self:globalThis,zO=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),i=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case ru:case t0:return n(u,o);case Do:{const f=n([],o);for(const h of u)f.push(i(h));return f}case Qa:{const f=n({},o);for(const[h,p]of u)f[i(h)]=i(p);return f}case eh:return n(new Date(u),o);case th:{const{source:f,flags:h}=u;return n(new RegExp(f,h),o)}case nh:{const f=n(new Map,o);for(const[h,p]of u)f.set(i(h),i(p));return f}case rh:{const f=n(new Set,o);for(const h of u)f.add(i(h));return f}case n0:{const{name:f,message:h}=u;return n(new qy[f](h),o)}case r0:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return n(new DataView(f),u)}}return n(new qy[a](u),o)};return i},Wy=e=>zO(new Map,e)(0),ls="",{toString:UO}={},{keys:BO}=Object,_o=e=>{const t=typeof e;if(t!=="object"||!e)return[ru,t];const n=UO.call(e).slice(8,-1);switch(n){case"Array":return[Do,ls];case"Object":return[Qa,ls];case"Date":return[eh,ls];case"RegExp":return[th,ls];case"Map":return[nh,ls];case"Set":return[rh,ls];case"DataView":return[Do,n]}return n.includes("Array")?[Do,n]:n.includes("Error")?[n0,n]:[Qa,n]},Ca=([e,t])=>e===ru&&(t==="function"||t==="symbol"),$O=(e,t,n,i)=>{const o=(u,f)=>{const h=i.push(u)-1;return n.set(f,h),h},a=u=>{if(n.has(u))return n.get(u);let[f,h]=_o(u);switch(f){case ru:{let m=u;switch(h){case"bigint":f=r0,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return o([t0],u)}return o([f,m],u)}case Do:{if(h){let x=u;return h==="DataView"?x=new Uint8Array(u.buffer):h==="ArrayBuffer"&&(x=new Uint8Array(u)),o([h,[...x]],u)}const m=[],y=o([f,m],u);for(const x of u)m.push(a(x));return y}case Qa:{if(h)switch(h){case"BigInt":return o([h,u.toString()],u);case"Boolean":case"Number":case"String":return o([h,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const m=[],y=o([f,m],u);for(const x of BO(u))(e||!Ca(_o(u[x])))&&m.push([a(x),a(u[x])]);return y}case eh:return o([f,u.toISOString()],u);case th:{const{source:m,flags:y}=u;return o([f,{source:m,flags:y}],u)}case nh:{const m=[],y=o([f,m],u);for(const[x,v]of u)(e||!(Ca(_o(x))||Ca(_o(v))))&&m.push([a(x),a(v)]);return y}case rh:{const m=[],y=o([f,m],u);for(const x of u)(e||!Ca(_o(x)))&&m.push(a(x));return y}}const{message:p}=u;return o([f,{name:h,message:p}],u)};return a},Qy=(e,{json:t,lossy:n}={})=>{const i=[];return $O(!(t||n),!!t,new Map,i)(e),i},Ka=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Wy(Qy(e,t)):structuredClone(e):(e,t)=>Wy(Qy(e,t));function VO(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function HO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||VO,i=e.options.footnoteBackLabel||HO,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h0&&R.push({type:"text",value:" "});let P=typeof n=="string"?n:n(h,v);typeof P=="string"&&(P={type:"text",value:P}),R.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,v),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const E=m[m.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const P=E.children[E.children.length-1];P&&P.type==="text"?P.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...R)}else m.push(...R);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(m,!0)};e.patch(p,k),f.push(k)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ka(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:` `}]}}const i0=(function(e){if(e==null)return YO;if(typeof e=="function")return iu(e);if(typeof e=="object")return Array.isArray(e)?WO(e):QO(e);if(typeof e=="string")return KO(e);throw new Error("Expected function, string, or object as test")});function WO(e){const t=[];let n=-1;for(;++n":""))+")"})}return x;function x(){let v=s0,R,_,E;if((!t||a(h,p,m[m.length-1]||void 0))&&(v=e2(n(h,m)),v[0]===Ky))return v;if("children"in h&&h.children){const k=h;if(k.children&&v[0]!==JO)for(_=(i?k.children.length:-1)+u,E=m.concat(k);_>-1&&_0&&n.push({type:"text",value:` `}),n}function Yy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Gy(e,t){const n=n2(e,t),i=n.one(e,void 0),o=qO(n),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&a.children.push({type:"text",value:` `},o),a}function l2(e,t){return e&&"run"in e?async function(n,i){const o=Gy(n,{file:i,...t});await e.run(o,i)}:function(n,i){return Gy(n,{file:i,...e||t})}}function Xy(e){if(e)throw e}var vf,Jy;function a2(){if(Jy)return vf;Jy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},a=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var m=e.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!m&&!y)return!1;var x;for(x in p);return typeof x>"u"||e.call(p,x)},u=function(p,m){n&&m.name==="__proto__"?n(p,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):p[m.name]=m.newValue},f=function(p,m){if(m==="__proto__")if(e.call(p,m)){if(i)return i(p,m).value}else return;return p[m]};return vf=function h(){var p,m,y,x,v,R,_=arguments[0],E=1,k=arguments.length,P=!1;for(typeof _=="boolean"&&(P=_,_=arguments[1]||{},E=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});Eu.length;let h;f&&u.push(o);try{h=e.apply(this,u)}catch(p){const m=p;if(f&&n)throw m;return o(m)}f||(h&&h.then&&typeof h.then=="function"?h.then(a,o):h instanceof Error?o(h):a(h))}function o(u,...f){n||(n=!0,t(u,...f))}function a(u){o(null,u)}}const Vn={basename:d2,dirname:h2,extname:p2,join:m2,sep:"/"};function d2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rl(e);let n=0,i=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else i<0&&(a=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let u=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(i=o):(f=-1,i=u));return n===i?i=u:i<0&&(i=e.length),e.slice(n,i)}function h2(e){if(rl(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function p2(e){rl(e);let t=e.length,n=-1,i=0,o=-1,a=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){i=t+1;break}continue}n<0&&(u=!0,n=t+1),f===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function m2(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function y2(e,t){let n="",i=0,o=-1,a=0,u=-1,f,h;for(;++u<=e.length;){if(u2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",i=0):(n=n.slice(0,h),i=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",i=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),i=u-o-1;o=u,a=0}else f===46&&a>-1?a++:a=-1}return n}function rl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const v2={cwd:x2};function x2(){return"/"}function pd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function w2(e){if(typeof e=="string")e=new URL(e);else if(!pd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return b2(e)}function b2(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n0){let[v,...R]=m;const _=i[x][1];hd(_)&&hd(v)&&(v=xf(!0,_,v)),i[x]=[p,v,...R]}}}}const _2=new ih().freeze();function Sf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ef(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _f(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ev(e){if(!hd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function tv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Aa(e){return C2(e)?e:new l0(e)}function C2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function A2(e){return typeof e=="string"||T2(e)}function T2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const R2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",nv=[],rv={allowDangerousHtml:!0},P2=/^(https?|ircs?|mailto|xmpp)$/i,N2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function O2(e){const t=I2(e),n=L2(e);return D2(t.runSync(t.parse(n),n),e)}function I2(e){const t=e.rehypePlugins||nv,n=e.remarkPlugins||nv,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rv}:rv;return _2().use(dO).use(n).use(l2,i).use(t)}function L2(e){const t=e.children||"",n=new l0;return typeof t=="string"&&(n.value=t),n}function D2(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||j2;for(const m of N2)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+R2+m.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),o0(e,p),qR(e,{Fragment:w.Fragment,components:o,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function p(m,y,x){if(m.type==="raw"&&x&&typeof y=="number")return u?x.children.splice(y,1):x.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let v;for(v in mf)if(Object.hasOwn(mf,v)&&Object.hasOwn(m.properties,v)){const R=m.properties[v],_=mf[v];(_===null||_.includes(m.tagName))&&(m.properties[v]=h(String(R||""),v,m))}}if(m.type==="element"){let v=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!v&&i&&typeof y=="number"&&(v=!i(m,y,x)),v&&x&&typeof y=="number")return f&&m.children?x.children.splice(y,1,...m.children):x.children.splice(y,1),y}}}function j2(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||P2.test(e.slice(0,t))?e:""}function iv(e){const t=new Date(e),n=["January","February","March","April","May","June","July","August","September","October","November","December"];return`${t.getUTCDate()} ${n[t.getUTCMonth()]} ${t.getUTCFullYear()}`}function F2(e){const t=new Date(e);return`${String(t.getUTCDate()).padStart(2,"0")} ${["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"][t.getUTCMonth()]} ${t.getUTCFullYear()}`}function M2(){const{slug:e}=QE(),[t,n]=N.useState(null),[i,o]=N.useState([]),[a,u]=N.useState(!0),[f,h]=N.useState(!1),[p,m]=N.useState(!1);N.useEffect(()=>{window.scrollTo(0,0),(async()=>{try{const x=await mi.entities.PressRelease.list("-publication_date",200),v=x.find(_=>_.slug===e&&(_.status==="Published"||!_.status));if(!v){h(!0),u(!1);return}n(v);const R=x.filter(_=>_.id!==v.id&&_.category===v.category).slice(0,3);o(R),document.title=v.seo_title||`${v.title} | Alrazah`}catch{h(!0)}finally{u(!1)}})()},[e]);const y=()=>{navigator.clipboard.writeText(window.location.href),m(!0),setTimeout(()=>m(!1),2e3)};return a?w.jsxs("div",{className:"min-h-screen bg-[#F9F8F6]",children:[w.jsx(Ma,{}),w.jsx("div",{className:"py-32 text-center text-[#4A4A4A] text-[14px]",children:"Loading announcement…"})]}):f?w.jsxs("div",{className:"min-h-screen bg-[#F9F8F6]",children:[w.jsx(Ma,{}),w.jsx(id,{items:[{label:"Home",path:"/"},{label:"News & Media",path:"/news-media/press-releases"},{label:"Press Releases",path:"/news-media/press-releases"},{label:"Not found"}]}),w.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-24 text-center",children:[w.jsx(Yv,{size:40,className:"mx-auto text-[#8D0034] mb-5",strokeWidth:1.5}),w.jsx("h1",{className:"font-serif-al text-[28px] font-medium text-[#0A0A0A] mb-3",children:"Announcement not found"}),w.jsx("p",{className:"text-[#4A4A4A] mb-6",children:"This press release may have been moved or archived."}),w.jsxs("a",{href:"/news-media/press-releases",className:"inline-flex items-center gap-2 px-6 h-11 bg-[#8D0034] text-white text-[13px] font-semibold uppercase tracking-[0.08em]",children:[w.jsx(Kv,{size:15,strokeWidth:1.6})," Back to archive"]})]}),w.jsx(rd,{})]}):w.jsxs("div",{className:"min-h-screen bg-[#F9F8F6]",children:[w.jsx(Ma,{}),w.jsx(id,{items:[{label:"Home",path:"/"},{label:"News & Media",path:"/news-media/press-releases"},{label:"Press Releases",path:"/news-media/press-releases"},{label:t.title.length>60?t.title.slice(0,60)+"…":t.title}]}),w.jsx("section",{className:"border-b border-[#E4E4E4]",children:w.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-12 md:py-16",children:[w.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-[0.14em] text-[#8D0034] mb-5",children:"Corporate Announcement"}),w.jsxs("div",{className:"flex items-center gap-3 mb-6 text-[13px]",children:[w.jsx("span",{className:"font-mono-al text-[#8D0034] font-medium",children:iv(t.publication_date)}),w.jsx("span",{className:"text-[#9A9A9A]",children:"·"}),w.jsxs("span",{className:"flex items-stretch",children:[w.jsx("span",{className:"w-[2px] bg-[#8D0034] mr-2"}),w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-[#0A0A0A] pt-0.5",children:t.category})]}),t.location&&w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"text-[#9A9A9A]",children:"·"}),w.jsx("span",{className:"text-[#4A4A4A]",children:t.location})]})]}),w.jsx("h1",{className:"font-serif-al text-[32px] md:text-[46px] font-medium leading-[1.08] tracking-[-0.02em] text-[#0A0A0A] max-w-[900px]",children:t.title})]})}),w.jsx("section",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-12 md:py-16",children:w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] gap-12 lg:gap-20",children:[w.jsxs("article",{className:"max-w-[820px]",children:[t.featured_image&&w.jsx("div",{className:"mb-10 -mx-1 overflow-hidden",children:w.jsx("img",{src:t.featured_image,alt:"",className:"w-full h-auto object-cover",loading:"lazy"})}),w.jsxs("div",{className:"al-prose text-[18px] leading-[1.75] text-[#0A0A0A]",children:[t.excerpt&&w.jsx("p",{className:"text-[20px] font-medium leading-[1.55] text-[#0A0A0A] mb-8 pb-8 border-b border-[#E4E4E4]",children:t.excerpt}),w.jsx(O2,{children:t.body||""})]}),w.jsxs("div",{className:"mt-12 pt-8 border-t border-[#E4E4E4]",children:[w.jsx("p",{className:"text-[12px] font-semibold uppercase tracking-[0.14em] text-[#4A4A4A] mb-4",children:"Share this announcement"}),w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx(as,{label:"LinkedIn",href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(window.location.href)}`,children:w.jsx(og,{size:17,strokeWidth:1.6})}),w.jsx(as,{label:"X",href:`https://twitter.com/intent/tweet?url=${encodeURIComponent(window.location.href)}`,children:w.jsx(ag,{size:17,strokeWidth:1.6})}),w.jsx(as,{label:"Email",href:`mailto:?subject=${encodeURIComponent(t.title)}`,children:w.jsx(lg,{size:17,strokeWidth:1.6})}),w.jsx("button",{onClick:y,"aria-label":"Copy link",className:"w-10 h-10 inline-flex items-center justify-center border border-[#D9D9D9] text-[#0A0A0A] hover:border-[#8D0034] hover:text-[#8D0034] transition-colors al-focus-ring",children:w.jsx(Lk,{size:17,strokeWidth:1.6})}),p&&w.jsx("span",{className:"text-[12px] text-[#8D0034]",children:"Link copied"})]})]})]}),w.jsx("aside",{className:"lg:sticky lg:top-[96px] lg:self-start",children:w.jsxs("div",{className:"border border-[#E4E4E4] bg-white",children:[w.jsx("div",{className:"px-5 py-4 border-b border-[#E4E4E4]",children:w.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8D0034]",children:"Press Release"})}),w.jsxs("dl",{className:"px-5 py-2 text-[13px]",children:[w.jsx(Ta,{label:"Published",value:iv(t.publication_date)}),w.jsx(Ta,{label:"Category",value:t.category}),t.location&&w.jsx(Ta,{label:"Location",value:t.location}),t.author_department&&w.jsx(Ta,{label:"Issued by",value:t.author_department})]}),w.jsxs("div",{className:"px-5 py-4 border-t border-[#E4E4E4]",children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#4A4A4A] mb-3",children:"Share"}),w.jsxs("div",{className:"flex items-center gap-2",children:[w.jsx(as,{label:"LinkedIn",href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(window.location.href)}`,children:w.jsx(og,{size:16,strokeWidth:1.6})}),w.jsx(as,{label:"X",href:`https://twitter.com/intent/tweet?url=${encodeURIComponent(window.location.href)}`,children:w.jsx(ag,{size:16,strokeWidth:1.6})}),w.jsx(as,{label:"Email",href:`mailto:?subject=${encodeURIComponent(t.title)}`,children:w.jsx(lg,{size:16,strokeWidth:1.6})})]})]}),w.jsxs("div",{className:"px-5 py-4 border-t border-[#E4E4E4] flex flex-col gap-2",children:[w.jsxs("button",{onClick:()=>window.print(),className:"inline-flex items-center gap-2 h-10 px-4 border border-[#D9D9D9] text-[12px] font-semibold uppercase tracking-[0.08em] text-[#0A0A0A] hover:border-[#8D0034] hover:text-[#8D0034] transition-colors al-focus-ring",children:[w.jsx(Uk,{size:15,strokeWidth:1.6})," Print"]}),t.pdf_attachment&&w.jsxs("a",{href:t.pdf_attachment,download:!0,className:"inline-flex items-center gap-2 h-10 px-4 border border-[#8D0034] text-[12px] font-semibold uppercase tracking-[0.08em] text-[#8D0034] hover:bg-[#8D0034] hover:text-white transition-colors al-focus-ring",children:[w.jsx(Rk,{size:15,strokeWidth:1.6})," Download PDF"]})]})]})})]})}),i.length>0&&w.jsx("section",{className:"border-t border-[#E4E4E4]",children:w.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 md:px-8 py-16 md:py-20",children:[w.jsx("h2",{className:"font-serif-al text-[28px] md:text-[34px] font-medium text-[#0A0A0A] mb-8",children:"Related announcements"}),w.jsx("div",{className:"border-t border-[#E4E4E4]",children:i.map(x=>w.jsx("a",{href:`/news-media/press-releases/${x.slug}`,className:"group block border-b border-[#E4E4E4] hover:bg-[#F4E8ED]/40 transition-colors",children:w.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[140px_130px_1fr_auto] gap-4 md:gap-6 py-6 items-start",children:[w.jsx("div",{className:"font-mono-al text-[13px] font-medium text-[#8D0034] tracking-[0.06em]",children:F2(x.publication_date)}),w.jsxs("div",{className:"flex items-stretch",children:[w.jsx("span",{className:"w-[2px] bg-[#8D0034] mr-2.5"}),w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-[#0A0A0A] pt-0.5",children:x.category})]}),w.jsx("h3",{className:"font-serif-al text-[17px] md:text-[19px] font-medium leading-[1.3] text-[#0A0A0A] group-hover:text-[#8D0034] transition-colors max-w-[560px]",children:x.title}),w.jsx(us,{size:18,className:"text-[#0A0A0A] group-hover:text-[#8D0034] group-hover:translate-x-1 transition-all",strokeWidth:1.6})]})},x.id))})]})}),w.jsx(rd,{})]})}function Ta({label:e,value:t}){return w.jsxs("div",{className:"py-2.5 border-b border-[#F0F0F0] last:border-0",children:[w.jsx("dt",{className:"text-[11px] font-semibold uppercase tracking-[0.1em] text-[#4A4A4A] mb-1",children:e}),w.jsx("dd",{className:"text-[14px] text-[#0A0A0A]",children:t})]})}function as({children:e,label:t,href:n}){return w.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer","aria-label":`Share on ${t}`,className:"w-10 h-10 inline-flex items-center justify-center border border-[#D9D9D9] text-[#0A0A0A] hover:border-[#8D0034] hover:text-[#8D0034] transition-colors al-focus-ring",children:e})}const z2=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:i}=aR();if(t||e)return w.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:w.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return w.jsx(uR,{});if(n.type==="auth_required")return i(),null}return w.jsxs(a_,{children:[w.jsx(Ao,{path:"/news-media/press-releases",element:w.jsx(xy,{})}),w.jsx(Ao,{path:"/news-media/press-releases/:slug",element:w.jsx(M2,{})}),w.jsx(Ao,{path:"/",element:w.jsx(xy,{})}),w.jsx(Ao,{path:"*",element:w.jsx(oR,{})})]})};function U2(){return w.jsx(lR,{children:w.jsxs(aE,{client:bE,children:[w.jsxs(f_,{children:[w.jsx(fR,{}),w.jsx(z2,{})]}),w.jsx(jS,{})]})})}hb.createRoot(document.getElementById("root")).render(w.jsx(U2,{}));